Skip to content

Commit 277801d

Browse files
committed
feat: removed unncessary flags, cleaned up package.json
1 parent 2c0bde7 commit 277801d

File tree

8 files changed

+2316
-2650
lines changed

8 files changed

+2316
-2650
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
{{!This is a comment. Removed the export of runtimes because we do not need
4+
those functions. Was causing error because exported a def called ResponseError
5+
which is also used by vscode LSP}}
6+
{{#models.0}}
7+
export * from './models/index{{importFileExtension}}';
8+
{{/models.0}}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}}
3+
* @export
4+
* @interface {{classname}}
5+
*/
6+
export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
7+
{{#additionalPropertiesType}}
8+
[key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}};
9+
{{/additionalPropertiesType}}
10+
{{#vars}}
11+
/**
12+
* {{#lambda.indented_star_4}}{{{unescapedDescription}}}{{/lambda.indented_star_4}}
13+
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
14+
* @memberof {{classname}}
15+
{{#deprecated}}
16+
* @deprecated
17+
{{/deprecated}}
18+
*/
19+
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
20+
{{/vars}}
21+
}{{#hasEnums}}
22+
23+
{{#vars}}
24+
{{!Changed to make actual string enum}}
25+
{{#isEnum}}
26+
{{#stringEnums}}
27+
/**
28+
* @export
29+
* @type {string}
30+
*/
31+
export type {{classname}}{{enumName}} = {{#allowableValues}} {{#enumVars}}{{{value}}}{{^-last}} | {{/-last}}{{/enumVars}}{{/allowableValues}};
32+
33+
{{/stringEnums}}{{^stringEnums}}
34+
/**
35+
* @export
36+
*/
37+
export const {{classname}}{{enumName}} = {
38+
{{#allowableValues}}
39+
{{#enumVars}}
40+
{{{name}}}: {{{value}}}{{^-last}},{{/-last}}
41+
{{/enumVars}}
42+
{{/allowableValues}}
43+
} as const;
44+
export type {{classname}}{{enumName}} = typeof {{classname}}{{enumName}}[keyof typeof {{classname}}{{enumName}}];
45+
{{/stringEnums}}
46+
{{/isEnum}}{{/vars}}{{/hasEnums}}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
24+
25+
/src/runtime.ts

types/codegen/openapitools.json

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,26 @@
99
"output": "#{cwd}/generated",
1010
"inputSpec": "#{cwd}/schema/chatTypes.json",
1111
"templateDir": "#{cwd}/custom-templates",
12-
"typeMappings": {
13-
"Position": "Position",
14-
"Range": "Range",
15-
"TextDocumentIdentifier": "TextDocumentIdentifier"
16-
},
17-
"importMappings": {
18-
"Position": "../../lsp",
19-
"Range": "../../lsp",
20-
"TextDocumentIdentifier": "../../lsp"
21-
},
2212
"additionalProperties": {
2313
"supportsES6": true,
24-
"modelPropertyNaming": "original",
25-
"enumPropertyNaming": "original",
26-
"npmName": "@aws/language-server-runtimes-generated-types",
27-
"npmVersion": "1.0.0",
28-
"withInterfaces": true,
14+
"modelPropertyNaming": "camelCase",
15+
"enumPropertyNaming": "camelCase",
16+
"npmName": "@local/language-server-runtimes-generated-types",
17+
"npmVersion": "0.0.1",
2918
"nullSafeAdditionalProps": false,
3019
"withoutRuntimeChecks": true,
3120
"stringEnums": true,
32-
"disallowAdditionalPropertiesIfNotPresent": false,
33-
"useSingleRequestParameter": true,
34-
"hasImports": true
21+
"disallowAdditionalPropertiesIfNotPresent": false
22+
},
23+
"global-property": {
24+
"generateAliasAsModel": true
25+
},
26+
"openapi-normalizer": {
27+
"REF_AS_PARENT_IN_ALLOF": true
3528
},
36-
"openapi-normalizer": "REF_AS_PARENT_IN_ALLOF=true"
29+
"reservedWordsMappings": {
30+
"export": "export"
31+
}
3732
}
3833
}
3934
}

0 commit comments

Comments
 (0)