mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
refactor: Handle support for --postfix inside cli
This commit is contained in:
parent
25ea1e298e
commit
b1a8eb003a
@ -43,7 +43,8 @@ if (OpenAPI) {
|
||||
exportModels: JSON.parse(params.exportModels) === true,
|
||||
exportSchemas: JSON.parse(params.exportSchemas) === true,
|
||||
indent: params.indent,
|
||||
postfix: params.postfix,
|
||||
postfixServices: params.postfix ?? params.postfixServices,
|
||||
postfixModels: params.postfixModels,
|
||||
request: params.request,
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
10
src/index.ts
10
src/index.ts
@ -24,10 +24,6 @@ export type Options = {
|
||||
exportModels?: boolean;
|
||||
exportSchemas?: boolean;
|
||||
indent?: Indent;
|
||||
/**
|
||||
* @deprecated use postfixServices instead
|
||||
*/
|
||||
postfix?: string;
|
||||
postfixServices?: string;
|
||||
postfixModels?: string;
|
||||
request?: string;
|
||||
@ -49,7 +45,6 @@ export type Options = {
|
||||
* @param exportModels Generate models
|
||||
* @param exportSchemas Generate schemas
|
||||
* @param indent Indentation options (4, 2 or tab)
|
||||
* @param postfix Deprecated: Param to support old parameter postfix, use postfixServices instead
|
||||
* @param postfixServices Service name postfix
|
||||
* @param postfixModels Model name postfix
|
||||
* @param request Path to custom request file
|
||||
@ -67,7 +62,6 @@ export const generate = async ({
|
||||
exportModels = true,
|
||||
exportSchemas = false,
|
||||
indent = Indent.SPACE_4,
|
||||
postfix,
|
||||
postfixServices = 'Service',
|
||||
postfixModels = '',
|
||||
request,
|
||||
@ -98,7 +92,7 @@ export const generate = async ({
|
||||
exportModels,
|
||||
exportSchemas,
|
||||
indent,
|
||||
postfix ?? postfixServices,
|
||||
postfixServices,
|
||||
postfixModels,
|
||||
clientName,
|
||||
request
|
||||
@ -122,7 +116,7 @@ export const generate = async ({
|
||||
exportModels,
|
||||
exportSchemas,
|
||||
indent,
|
||||
postfix ?? postfixServices,
|
||||
postfixServices,
|
||||
postfixModels,
|
||||
clientName,
|
||||
request
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user