@povio/openapi-codegen-cli 0.3.5 → 0.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/openapi-codegen-cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "main": "./dist/index.js",
5
5
  "bin": {
6
6
  "openapi-codegen": "./dist/sh.js"
@@ -8,9 +8,10 @@
8
8
  {{#if includeNamespace}}
9
9
  export namespace {{namespace}} {
10
10
  {{/if}}
11
- {{#each zodSchemas as | zodSchema |}}
11
+ {{#each zodSchemasData as | zodSchema |}}
12
12
  {{! Zod schema export }}
13
- export const {{@key}} = {{{zodSchema}}};
13
+ {{#if zodSchema.isCircular}}// TODO: Fix type inference {{/if}}
14
+ export const {{@key}}{{#if zodSchema.isCircular}}: z.ZodType<unknown>{{/if}} = {{{zodSchema.code}}};
14
15
  {{! Zod schema infered type export }}
15
16
  export type {{zodInferedType @key}} = z.infer<typeof {{@key}}>;
16
17
 
@@ -15,7 +15,7 @@
15
15
  {{#if endpointConfig.headers}}
16
16
  headers: {
17
17
  {{#each endpointConfig.headers as | header |}}
18
- '{{@key}}': '{{header}}',
18
+ '{{@key}}': {{{header}}},
19
19
  {{/each}}
20
20
  },
21
21
  {{/if}}