Skip to content

Commit d58600d

Browse files
committed
initial
1 parent 474335b commit d58600d

File tree

7 files changed

+2901
-0
lines changed

7 files changed

+2901
-0
lines changed

types/codegen/README.md

Whitespace-only changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{#stringEnums}}
2+
/**
3+
* {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}}
4+
* @export
5+
* @type {string}
6+
*/
7+
export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}} | {{/-last}}{{/enumVars}}{{/allowableValues}};
8+
{{/stringEnums}}{{^stringEnums}}
9+
/**
10+
* {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}}
11+
* @export
12+
*/
13+
export const {{classname}} = {
14+
{{#allowableValues}}
15+
{{#enumVars}}
16+
{{#enumDescription}}
17+
/**
18+
* {{enumDescription}}
19+
*/
20+
{{/enumDescription}}
21+
{{{name}}}: {{{value}}}{{^-last}},{{/-last}}
22+
{{/enumVars}}
23+
{{/allowableValues}}
24+
} as const;
25+
export type {{classname}} = typeof {{classname}}[keyof typeof {{classname}}];
26+
{{/stringEnums}}

types/codegen/openapitools.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3+
"spaces": 2,
4+
"generator-cli": {
5+
"version": "7.14.0",
6+
"generators": {
7+
"typescript-fetch": {
8+
"generatorName": "typescript-fetch",
9+
"output": "#{cwd}/generated",
10+
"inputSpec": "#{cwd}/schema/chatTypes.json",
11+
"templateDir": "#{cwd}/custom-templates",
12+
"additionalProperties": {
13+
"supportsES6": true,
14+
"modelPropertyNaming": "original",
15+
"enumPropertyNaming": "original",
16+
"npmName": "@json-schema-openapi/generated",
17+
"npmVersion": "1.0.0",
18+
"withInterfaces": true,
19+
"nullSafeAdditionalProps": true,
20+
"withoutRuntimeChecks": true,
21+
"stringEnums": true,
22+
"disallowAdditionalPropertiesIfNotPresent": false,
23+
"useSingleRequestParameter": true
24+
}
25+
}
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)