@tim-smart/openapi-gen 0.3.15 → 0.3.16
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/main.js +3 -2
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -35181,7 +35181,8 @@ var layerTransformerTs = succeed10(
|
|
|
35181
35181
|
return true;
|
|
35182
35182
|
},
|
|
35183
35183
|
onTopLevel({ name: name2, source, schema, description }) {
|
|
35184
|
-
return source[0] === "{" ? "oneOf" in schema ? `${toComment(description)}export
|
|
35184
|
+
return source[0] === "{" ? "oneOf" in schema ? `${toComment(description)}export const ${name2} = ${source};
|
|
35185
|
+
export type ${name2} = (typeof ${name2})[keyof typeof ${name2}];` : `${toComment(description)}export interface ${name2} ${source}` : `${toComment(description)}export type ${name2} = ${source}`;
|
|
35185
35186
|
},
|
|
35186
35187
|
propertySeparator: ";\n ",
|
|
35187
35188
|
onProperty(options3) {
|
|
@@ -35222,7 +35223,7 @@ var layerTransformerTs = succeed10(
|
|
|
35222
35223
|
return items.map((_) => _.source).join(" | ");
|
|
35223
35224
|
}
|
|
35224
35225
|
return `{
|
|
35225
|
-
${items.map(({ description, title, source }) => `${toComment(description)}${JSON.stringify(getOrNull(title))}
|
|
35226
|
+
${items.map(({ description, title, source }) => `${toComment(description)}${JSON.stringify(getOrNull(title))}: ${source}`).join(",\n ")}} as const
|
|
35226
35227
|
`;
|
|
35227
35228
|
}
|
|
35228
35229
|
})
|