@povio/openapi-codegen-cli 0.11.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/commands/generate.d.ts +1 -1
- package/dist/index.js +36 -36
- package/dist/sh.js +51 -51
- package/package.json +1 -1
- package/src/generators/templates/endpoints.hbs +1 -1
- package/src/generators/templates/partials/endpoint-config.hbs +2 -2
- package/src/generators/templates/partials/endpoint-param-parse.hbs +1 -0
- package/src/generators/templates/zod.hbs +0 -1
- package/src/generators/templates/partials/endpoint-param-sorting.hbs +0 -1
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@ export const {{endpointName endpoint}} = ({{{genEndpointParams endpoint}}}{{#if
|
|
|
30
30
|
`{{endpointPath endpoint}}`,
|
|
31
31
|
{{! Body }}
|
|
32
32
|
{{#with (endpointBody endpoint) as | endpointBody |}}
|
|
33
|
-
{{#if endpointBody}}{{endpointBody.name}}, {{/if}}
|
|
33
|
+
{{#if endpointBody}}{{#if ../../generateParse}}{{{genEndpointParamParse endpointBody endpointBody.name}}}{{else}}{{endpointBody.name}}{{/if}}, {{/if}}
|
|
34
34
|
{{/with}}
|
|
35
35
|
{{! Config }}
|
|
36
36
|
{{{genEndpointConfig endpoint}}}
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
params: {
|
|
8
8
|
{{#each endpointConfig.params as | param |}}
|
|
9
9
|
{{#if (isEqual param.name param.value) }}
|
|
10
|
-
{{{param.name}}}{{#if
|
|
10
|
+
{{{param.name}}}{{#if ../generateParse}}: {{{genEndpointParamParse param param.name}}}{{/if}},
|
|
11
11
|
{{else}}
|
|
12
|
-
{{{param.name}}}: {{#if
|
|
12
|
+
{{{param.name}}}: {{#if ../generateParse}}{{{genEndpointParamParse param param.value}}}{{else}}{{param.value}}{{/if}},
|
|
13
13
|
{{/if}}
|
|
14
14
|
{{/each}}
|
|
15
15
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{zodExtended}}.{{parse}}({{#if param.parameterSortingEnumSchemaName}}{{zodExtended}}.{{sortingString}}({{importedZodSchemaName param.parameterSortingEnumSchemaName}}){{#if addOptional}}.optional(){{/if}}{{else}}{{importedZodSchemaName param.zodSchema}}{{#if addOptional}}.optional(){{/if}}{{/if}}, {{paramName}})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{zodExtended}}.{{parse}}({{zodExtended}}.{{sortingString}}({{importedZodSchemaName enumSchemaName}}), {{paramName}})
|