@codegena/oapi3ts
Version:
Codegeneration from OAS3 to TypeScript
40 lines (39 loc) • 1.38 kB
TypeScript
import { Oas3Server } from '@codegena/definitions/oas3';
export interface ConvertorConfig {
/**
* Regex which is using for extract JSON Path parts.
*/
jsonPathRegex: RegExp;
/**
* Mode when models that refer to any models via `$ref`
* replacing implicitly even firsts have names.
*
* For example, in this case:
* ```yml
* schema:
* schema:
* FistModel:
* $ref: SecondModel
* SecondModel:
* type: object
* properties:
* exampleProperty:
* type: string
* ```
*
* `FirstModel` will be replaced by `SecondModel` in every
* place when `implicitTypesRefReplacement=true` but otherwise
* `SecondModel` will be rendered as interface such extends `FistModel`.
*
*/
implicitTypesRefReplacement: boolean;
parametersModelName: (baseTypeName: any) => string;
headersModelName: (baseTypeName: any, code: any, contentType?: any) => string;
requestModelName: (baseTypeName: any, contentType?: any) => string;
responseModelName: (baseTypeName: any, code: any, contentType?: any) => string;
typingsDirectory: string;
mocksDirectory: string;
excludeFromComparison: string[];
defaultServerInfo: Oas3Server[];
}
export declare const defaultConfig: ConvertorConfig;