File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " swagger-typescript-api " : patch
3+ ---
4+
5+ better typings for swaggerSchema, originalSchema and resolvedSwaggerSchema
Original file line number Diff line number Diff line change 11import type { PartialDeep } from "type-fest" ;
22import type { ComponentTypeNameResolver } from "../src/component-type-name-resolver.js" ;
33import type * as CONSTANTS from "../src/constants.js" ;
4- import type { RefDetails } from "../src/resolved-swagger-schema.js" ;
4+ import type {
5+ RefDetails ,
6+ ResolvedSwaggerSchema ,
7+ } from "../src/resolved-swagger-schema.js" ;
58import type { MonoSchemaParser } from "../src/schema-parser/mono-schema-parser.js" ;
69import type { Translator } from "../src/translators/translator.js" ;
10+ import type { OpenAPI } from "openapi-types" ;
711
812export type HttpClientType =
913 ( typeof CONSTANTS . HTTP_CLIENT ) [ keyof typeof CONSTANTS . HTTP_CLIENT ] ;
@@ -526,9 +530,11 @@ export interface GenerateApiConfiguration {
526530 /** generate all "enum" types as union types (T1 | T2 | TN) */
527531 generateUnionEnums : boolean ;
528532 /** parsed swagger schema */
529- swaggerSchema : object ;
533+ swaggerSchema : OpenAPI . Document ;
530534 /** original swagger schema */
531- originalSchema : object ;
535+ originalSchema : OpenAPI . Document ;
536+ /** original class container for current schema use */
537+ resolvedSwaggerSchema ?: ResolvedSwaggerSchema ;
532538 /** map of schema component references */
533539 componentsMap : Record < string , SchemaComponent > ;
534540 /** flag indicating the schema was converted from Swagger 2.0 */
You can’t perform that action at this time.
0 commit comments