@aws/nx-plugin 0.7.0 → 0.7.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/LICENSE-THIRD-PARTY +1682 -108
- package/generators.json +6 -0
- package/package.json +9 -1
- package/src/cloudscape-website/app/generator.js +2 -2
- package/src/cloudscape-website/app/generator.js.map +1 -1
- package/src/infra/app/files/common/constructs/src/core/cfn-guard.ts.template +5 -1
- package/src/infra/app/generator.js +1 -1
- package/src/infra/app/generator.js.map +1 -1
- package/src/open-api/ts-hooks/generator.d.ts +11 -0
- package/src/open-api/ts-hooks/generator.js +17 -0
- package/src/open-api/ts-hooks/generator.js.map +1 -0
- package/src/open-api/ts-hooks/schema.d.ts +9 -0
- package/src/open-api/ts-hooks/schema.json +20 -0
- package/src/open-api/utils/codegen-data/languages.d.ts +10 -0
- package/src/open-api/utils/codegen-data/languages.js +175 -0
- package/src/open-api/utils/codegen-data/languages.js.map +1 -0
- package/src/open-api/utils/codegen-data/types.d.ts +20 -0
- package/src/open-api/utils/codegen-data/types.js +19 -0
- package/src/open-api/utils/codegen-data/types.js.map +1 -0
- package/src/open-api/utils/codegen-data.d.ts +6 -0
- package/src/open-api/utils/codegen-data.js +434 -0
- package/src/open-api/utils/codegen-data.js.map +1 -0
- package/src/open-api/utils/normalise.d.ts +6 -0
- package/src/open-api/utils/normalise.js +213 -0
- package/src/open-api/utils/normalise.js.map +1 -0
- package/src/open-api/utils/parse.d.ts +10 -0
- package/src/open-api/utils/parse.js +38 -0
- package/src/open-api/utils/parse.js.map +1 -0
- package/src/open-api/utils/refs.d.ts +23 -0
- package/src/open-api/utils/refs.js +41 -0
- package/src/open-api/utils/refs.js.map +1 -0
- package/src/open-api/utils/types.d.ts +6 -0
- package/src/open-api/utils/types.js +3 -0
- package/src/open-api/utils/types.js.map +1 -0
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +33 -0
- package/src/py/fast-api/files/app/__name__/main.py.template +3 -1
- package/src/py/fast-api/generator.js +3 -2
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/project/generator.js +1 -1
- package/src/py/project/generator.js.map +1 -1
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +7 -3
- package/src/trpc/backend/files/backend/src/init.ts.template +2 -0
- package/src/trpc/backend/generator.js +17 -3
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/ts/lib/generator.js +1 -2
- package/src/ts/lib/generator.js.map +1 -1
- package/src/utils/files/http-api/common/constructs/src/core/http-api.ts.template +5 -3
- package/src/utils/names.d.ts +2 -0
- package/src/utils/names.js +6 -1
- package/src/utils/names.js.map +1 -1
- package/src/utils/nx.d.ts +1 -1
- package/src/utils/nx.js +3 -3
- package/src/utils/nx.js.map +1 -1
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildOpenApiCodeGenData = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
const gen = tslib_1.__importStar(require("@hey-api/openapi-ts"));
|
|
10
|
+
const normalise_1 = require("./normalise");
|
|
11
|
+
const lodash_kebabcase_1 = tslib_1.__importDefault(require("lodash.kebabcase"));
|
|
12
|
+
const lodash_camelcase_1 = tslib_1.__importDefault(require("lodash.camelcase"));
|
|
13
|
+
const lodash_orderby_1 = tslib_1.__importDefault(require("lodash.orderby"));
|
|
14
|
+
const lodash_uniqby_1 = tslib_1.__importDefault(require("lodash.uniqby"));
|
|
15
|
+
const lodash_snakecase_1 = tslib_1.__importDefault(require("lodash.snakecase"));
|
|
16
|
+
const lodash_trim_1 = tslib_1.__importDefault(require("lodash.trim"));
|
|
17
|
+
const refs_1 = require("./refs");
|
|
18
|
+
const names_1 = require("../../utils/names");
|
|
19
|
+
const languages_1 = require("./codegen-data/languages");
|
|
20
|
+
const types_1 = require("./codegen-data/types");
|
|
21
|
+
/**
|
|
22
|
+
* Builds a data structure from an OpenAPI spec which can be used to generate code
|
|
23
|
+
*/
|
|
24
|
+
const buildOpenApiCodeGenData = (inSpec) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
// Ensure spec is ready for codegen
|
|
26
|
+
const spec = (0, normalise_1.normaliseOpenApiSpecForCodeGen)(inSpec);
|
|
27
|
+
// Build the initial data, which we will augment with additional information
|
|
28
|
+
const data = yield buildInitialCodeGenData(spec);
|
|
29
|
+
// Mutate the models with enough data to render composite models in the templates
|
|
30
|
+
ensureCompositeModels(data);
|
|
31
|
+
// Ensure the models have their links set when they are arrays/dictionaries
|
|
32
|
+
ensureModelLinks(spec, data);
|
|
33
|
+
// Augment operations with additional data
|
|
34
|
+
data.services.forEach((service) => {
|
|
35
|
+
// Keep track of the request and response models we need the service (ie api client) to import
|
|
36
|
+
const requestModelImports = [];
|
|
37
|
+
const responseModelImports = [];
|
|
38
|
+
service.operations.forEach((op) => {
|
|
39
|
+
var _a, _b, _c, _d, _e;
|
|
40
|
+
// Extract the operation back from the openapi spec
|
|
41
|
+
const specOp = (_b = (_a = spec === null || spec === void 0 ? void 0 : spec.paths) === null || _a === void 0 ? void 0 : _a[op.path]) === null || _b === void 0 ? void 0 : _b[op.method.toLowerCase()];
|
|
42
|
+
// Add vendor extensions
|
|
43
|
+
op.vendorExtensions = (_c = op.vendorExtensions) !== null && _c !== void 0 ? _c : {};
|
|
44
|
+
copyVendorExtensions(specOp !== null && specOp !== void 0 ? specOp : {}, op.vendorExtensions);
|
|
45
|
+
if (specOp) {
|
|
46
|
+
// Add all response models to the response model imports
|
|
47
|
+
responseModelImports.push(...op.responses
|
|
48
|
+
.filter((r) => r.export === 'reference')
|
|
49
|
+
.map((r) => r.type));
|
|
50
|
+
op.responses.forEach((response) => {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
const matchingSpecResponse = specOp.responses[`${response.code}`];
|
|
53
|
+
// parseOpenapi does not distinguish between returning an "any" or returning "void"
|
|
54
|
+
// We distinguish this by looking back each response in the spec, and checking whether it
|
|
55
|
+
// has content
|
|
56
|
+
if (matchingSpecResponse) {
|
|
57
|
+
// Resolve the ref if necessary
|
|
58
|
+
const specResponse = (0, refs_1.resolveIfRef)(spec, matchingSpecResponse);
|
|
59
|
+
// When there's no content, we set the type to 'void'
|
|
60
|
+
if (!specResponse.content) {
|
|
61
|
+
response.type = 'void';
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// Add the response media types
|
|
65
|
+
response.mediaTypes = Object.keys(specResponse.content);
|
|
66
|
+
const responseSchema = (_b = (_a = specResponse.content) === null || _a === void 0 ? void 0 : _a['application/json']) !== null && _b !== void 0 ? _b : Object.values(specResponse.content)[0];
|
|
67
|
+
if (responseSchema) {
|
|
68
|
+
mutateWithOpenapiSchemaProperties(spec, response, responseSchema);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
// If there's a user-specified operation id, prefer this over the generated name
|
|
74
|
+
if (op.id) {
|
|
75
|
+
op.name = (0, lodash_camelcase_1.default)(op.id);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const specParametersByName = Object.fromEntries(((_d = specOp === null || specOp === void 0 ? void 0 : specOp.parameters) !== null && _d !== void 0 ? _d : []).map((p) => {
|
|
79
|
+
const param = (0, refs_1.resolveIfRef)(spec, p);
|
|
80
|
+
return [param.name, param];
|
|
81
|
+
}));
|
|
82
|
+
// Loop through the parameters
|
|
83
|
+
op.parameters.forEach((parameter) => {
|
|
84
|
+
var _a, _b, _c, _d, _e;
|
|
85
|
+
// Add the request model import
|
|
86
|
+
if (parameter.export === 'reference') {
|
|
87
|
+
requestModelImports.push(parameter.type);
|
|
88
|
+
}
|
|
89
|
+
const specParameter = specParametersByName[parameter.prop];
|
|
90
|
+
const specParameterSchema = (0, refs_1.resolveIfRef)(spec, specParameter === null || specParameter === void 0 ? void 0 : specParameter.schema);
|
|
91
|
+
if (specParameterSchema) {
|
|
92
|
+
mutateWithOpenapiSchemaProperties(spec, parameter, specParameterSchema);
|
|
93
|
+
}
|
|
94
|
+
if (parameter.in === 'body') {
|
|
95
|
+
// Parameter name for the body is it's type in camelCase
|
|
96
|
+
parameter.name =
|
|
97
|
+
parameter.export === 'reference'
|
|
98
|
+
? (0, lodash_camelcase_1.default)(parameter.type)
|
|
99
|
+
: 'body';
|
|
100
|
+
parameter.prop = 'body';
|
|
101
|
+
// The request body is not in the "parameters" section of the openapi spec so we won't have added the schema
|
|
102
|
+
// properties above. Find it here.
|
|
103
|
+
const specBody = (0, refs_1.resolveIfRef)(spec, specOp === null || specOp === void 0 ? void 0 : specOp.requestBody);
|
|
104
|
+
if (specBody) {
|
|
105
|
+
if (parameter.mediaType) {
|
|
106
|
+
const bodySchema = (0, refs_1.resolveIfRef)(spec, (_b = (_a = specBody.content) === null || _a === void 0 ? void 0 : _a[parameter.mediaType]) === null || _b === void 0 ? void 0 : _b.schema);
|
|
107
|
+
if (bodySchema) {
|
|
108
|
+
mutateWithOpenapiSchemaProperties(spec, parameter, bodySchema);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Track all the media types that can be accepted in the request body
|
|
112
|
+
parameter.mediaTypes = Object.keys(specBody.content);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else if (['query', 'header'].includes(parameter.in) &&
|
|
116
|
+
specParameter) {
|
|
117
|
+
// Translate style/explode to OpenAPI v2 style collectionFormat
|
|
118
|
+
// https://spec.openapis.org/oas/v3.0.3.html#style-values
|
|
119
|
+
const style = (_c = specParameter.style) !== null && _c !== void 0 ? _c : (parameter.in === 'query' ? 'form' : 'simple');
|
|
120
|
+
const explode = (_d = specParameter.explode) !== null && _d !== void 0 ? _d : style === 'form';
|
|
121
|
+
if (parameter.in === 'query') {
|
|
122
|
+
parameter.collectionFormat = explode
|
|
123
|
+
? 'multi'
|
|
124
|
+
: ((_e = {
|
|
125
|
+
spaceDelimited: 'ssv',
|
|
126
|
+
pipeDelimited: 'tsv',
|
|
127
|
+
simple: 'csv',
|
|
128
|
+
form: 'csv',
|
|
129
|
+
}[style]) !== null && _e !== void 0 ? _e : 'multi');
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
// parameter.in === "header"
|
|
133
|
+
parameter.collectionFormat = explode ? 'multi' : 'csv';
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
mutateModelWithAdditionalTypes(parameter);
|
|
137
|
+
});
|
|
138
|
+
// Add language types to response models
|
|
139
|
+
((_e = op.responses) !== null && _e !== void 0 ? _e : []).forEach(mutateModelWithAdditionalTypes);
|
|
140
|
+
// Add variants of operation name
|
|
141
|
+
op.operationIdPascalCase = (0, names_1.pascalCase)(op.name);
|
|
142
|
+
op.operationIdKebabCase = (0, lodash_kebabcase_1.default)(op.name);
|
|
143
|
+
op.operationIdSnakeCase = (0, languages_1.toPythonName)('operation', op.name);
|
|
144
|
+
});
|
|
145
|
+
// Lexicographical ordering of operations
|
|
146
|
+
service.operations = (0, lodash_orderby_1.default)(service.operations, (op) => op.name);
|
|
147
|
+
// Add the models to import
|
|
148
|
+
service.modelImports = (0, lodash_orderby_1.default)((0, lodash_uniqby_1.default)([...service.imports, ...requestModelImports, ...responseModelImports], (x) => x));
|
|
149
|
+
// Add the service class name
|
|
150
|
+
service.className = `${service.name}Api`;
|
|
151
|
+
service.classNameSnakeCase = (0, lodash_snakecase_1.default)(service.className);
|
|
152
|
+
service.nameSnakeCase = (0, lodash_snakecase_1.default)(service.name);
|
|
153
|
+
});
|
|
154
|
+
// Augment models with additional data
|
|
155
|
+
data.models.forEach((model) => {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
// Add a snake_case name
|
|
158
|
+
model.nameSnakeCase = (0, languages_1.toPythonName)('model', model.name);
|
|
159
|
+
const matchingSpecModel = (_b = (_a = spec === null || spec === void 0 ? void 0 : spec.components) === null || _a === void 0 ? void 0 : _a.schemas) === null || _b === void 0 ? void 0 : _b[model.name];
|
|
160
|
+
if (matchingSpecModel) {
|
|
161
|
+
const specModel = (0, refs_1.resolveIfRef)(spec, matchingSpecModel);
|
|
162
|
+
mutateWithOpenapiSchemaProperties(spec, model, specModel);
|
|
163
|
+
// Add unique imports
|
|
164
|
+
model.uniqueImports = (0, lodash_orderby_1.default)((0, lodash_uniqby_1.default)([
|
|
165
|
+
...model.imports,
|
|
166
|
+
// Include property imports, if any
|
|
167
|
+
...model.properties
|
|
168
|
+
.filter((p) => p.export === 'reference')
|
|
169
|
+
.map((p) => p.type),
|
|
170
|
+
], (x) => x)).filter((modelImport) => modelImport !== model.name); // Filter out self for recursive model references
|
|
171
|
+
// Add deprecated flag if present
|
|
172
|
+
model.deprecated = specModel.deprecated || false;
|
|
173
|
+
// If the model has "additionalProperties" there should be a "dictionary" property
|
|
174
|
+
if (specModel.additionalProperties) {
|
|
175
|
+
model.additionalPropertiesProperty = model.properties.find((p) => !p.name && p.export === 'dictionary');
|
|
176
|
+
}
|
|
177
|
+
// Augment properties with additional data
|
|
178
|
+
model.properties.forEach((property) => {
|
|
179
|
+
var _a;
|
|
180
|
+
const matchingSpecProperty = (_a = specModel.properties) === null || _a === void 0 ? void 0 : _a[property.name];
|
|
181
|
+
if (matchingSpecProperty) {
|
|
182
|
+
const specProperty = (0, refs_1.resolveIfRef)(spec, matchingSpecProperty);
|
|
183
|
+
mutateWithOpenapiSchemaProperties(spec, property, specProperty);
|
|
184
|
+
}
|
|
185
|
+
// Add language-specific names/types
|
|
186
|
+
mutateModelWithAdditionalTypes(property);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
// Order models lexicographically by name
|
|
191
|
+
data.models = (0, lodash_orderby_1.default)(data.models, (d) => d.meta.name);
|
|
192
|
+
// Order services so default appears first, then otherwise by name
|
|
193
|
+
data.services = (0, lodash_orderby_1.default)(data.services, (s) => s.name === 'Default' ? '' : s.name);
|
|
194
|
+
// All operations across all services
|
|
195
|
+
const allOperations = (0, lodash_uniqby_1.default)(data.services.flatMap((s) => s.operations), (o) => o.name);
|
|
196
|
+
// Add top level vendor extensions
|
|
197
|
+
const vendorExtensions = {};
|
|
198
|
+
copyVendorExtensions(spec !== null && spec !== void 0 ? spec : {}, vendorExtensions);
|
|
199
|
+
return Object.assign(Object.assign({}, data), { info: spec.info, allOperations,
|
|
200
|
+
vendorExtensions });
|
|
201
|
+
});
|
|
202
|
+
exports.buildOpenApiCodeGenData = buildOpenApiCodeGenData;
|
|
203
|
+
const buildInitialCodeGenData = (spec) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
204
|
+
let data;
|
|
205
|
+
// We create a plugin which will capture the client data
|
|
206
|
+
const plugin = () => ({
|
|
207
|
+
name: 'plugin',
|
|
208
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
209
|
+
_handler: () => { },
|
|
210
|
+
_handlerLegacy: ({ client }) => {
|
|
211
|
+
data = client;
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
// These are not likely to be set but we save them just in case
|
|
215
|
+
const prevGlobalWindow = global.window;
|
|
216
|
+
const prevGlobalLocation = global.location;
|
|
217
|
+
try {
|
|
218
|
+
// See https://github.com/hey-api/openapi-ts/issues/1730
|
|
219
|
+
global.window = {};
|
|
220
|
+
global.location = { href: 'https://localhost/' };
|
|
221
|
+
// Use @hey-api/openapi-ts to build the initial data structure that we'll generate clients from
|
|
222
|
+
yield gen.createClient({
|
|
223
|
+
experimentalParser: false,
|
|
224
|
+
input: {
|
|
225
|
+
path: spec,
|
|
226
|
+
},
|
|
227
|
+
output: 'unused',
|
|
228
|
+
plugins: [plugin()],
|
|
229
|
+
dryRun: true,
|
|
230
|
+
logs: { level: 'silent' },
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
finally {
|
|
234
|
+
global.window = prevGlobalWindow;
|
|
235
|
+
global.location = prevGlobalLocation;
|
|
236
|
+
}
|
|
237
|
+
if (!data) {
|
|
238
|
+
// If this happens it indicates an update to @hey-api/openapi-ts which has removed the legacy parser
|
|
239
|
+
throw new Error('Failed to build code generation data');
|
|
240
|
+
}
|
|
241
|
+
return data;
|
|
242
|
+
});
|
|
243
|
+
/**
|
|
244
|
+
* Copy vendor extensions from the first parameter to the second
|
|
245
|
+
*/
|
|
246
|
+
const copyVendorExtensions = (object, vendorExtensions) => {
|
|
247
|
+
Object.entries(object !== null && object !== void 0 ? object : {}).forEach(([key, value]) => {
|
|
248
|
+
if (key.startsWith('x-')) {
|
|
249
|
+
vendorExtensions[key] = value;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
const mutateWithOpenapiSchemaProperties = (spec, model, schema, visited = new Set()) => {
|
|
254
|
+
var _a;
|
|
255
|
+
model.format = schema.format;
|
|
256
|
+
model.isInteger = schema.type === 'integer';
|
|
257
|
+
model.isShort = schema.format === 'int32';
|
|
258
|
+
model.isLong = schema.format === 'int64';
|
|
259
|
+
model.deprecated = !!schema.deprecated;
|
|
260
|
+
model.openapiType = schema.type;
|
|
261
|
+
model.isNotSchema = !!schema.not;
|
|
262
|
+
model.isEnum = !!schema.enum && schema.enum.length > 0;
|
|
263
|
+
// Copy any schema vendor extensions
|
|
264
|
+
model.vendorExtensions = {};
|
|
265
|
+
copyVendorExtensions(schema, model.vendorExtensions);
|
|
266
|
+
// Use our added vendor extension
|
|
267
|
+
model.isHoisted = !!((_a = model.vendorExtensions) === null || _a === void 0 ? void 0 : _a['x-aws-nx-hoisted']);
|
|
268
|
+
mutateModelWithAdditionalTypes(model);
|
|
269
|
+
visited.add(model);
|
|
270
|
+
const modelLink = (0, types_1.flattenModelLink)(model.link);
|
|
271
|
+
// Also apply to array items recursively
|
|
272
|
+
if (model.export === 'array' &&
|
|
273
|
+
model.link &&
|
|
274
|
+
'items' in schema &&
|
|
275
|
+
schema.items &&
|
|
276
|
+
!visited.has(modelLink)) {
|
|
277
|
+
const subSchema = (0, refs_1.resolveIfRef)(spec, schema.items);
|
|
278
|
+
mutateWithOpenapiSchemaProperties(spec, modelLink, subSchema, visited);
|
|
279
|
+
}
|
|
280
|
+
// Also apply to object properties recursively
|
|
281
|
+
if (model.export === 'dictionary' &&
|
|
282
|
+
model.link &&
|
|
283
|
+
'additionalProperties' in schema &&
|
|
284
|
+
schema.additionalProperties &&
|
|
285
|
+
!visited.has(modelLink)) {
|
|
286
|
+
const subSchema = (0, refs_1.resolveIfRef)(spec, schema.additionalProperties);
|
|
287
|
+
// Additional properties can be "true" rather than a type
|
|
288
|
+
if (subSchema !== true) {
|
|
289
|
+
mutateWithOpenapiSchemaProperties(spec, modelLink, subSchema, visited);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
model.properties
|
|
293
|
+
.filter((p) => { var _a; return !visited.has(p) && ((_a = schema.properties) === null || _a === void 0 ? void 0 : _a[(0, lodash_trim_1.default)(p.name, `"'`)]); })
|
|
294
|
+
.forEach((property) => {
|
|
295
|
+
const subSchema = (0, refs_1.resolveIfRef)(spec, schema.properties[(0, lodash_trim_1.default)(property.name, `"'`)]);
|
|
296
|
+
mutateWithOpenapiSchemaProperties(spec, property, subSchema, visited);
|
|
297
|
+
});
|
|
298
|
+
if (types_1.COMPOSED_SCHEMA_TYPES.has(model.export)) {
|
|
299
|
+
model.properties.forEach((property, i) => {
|
|
300
|
+
var _a;
|
|
301
|
+
const subSchema = (0, refs_1.resolveIfRef)(spec, (_a = schema[(0, lodash_camelcase_1.default)(model.export)]) === null || _a === void 0 ? void 0 : _a[i]);
|
|
302
|
+
if (subSchema) {
|
|
303
|
+
mutateWithOpenapiSchemaProperties(spec, property, subSchema, visited);
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Ensure that the "link" property of all dictionary/array models and properties are set recursively
|
|
310
|
+
*/
|
|
311
|
+
const ensureModelLinks = (spec, data) => {
|
|
312
|
+
const modelsByName = Object.fromEntries(data.models.map((m) => [m.name, m]));
|
|
313
|
+
const visited = new Set();
|
|
314
|
+
// Ensure set for all models
|
|
315
|
+
data.models.forEach((model) => {
|
|
316
|
+
var _a, _b;
|
|
317
|
+
const schema = (0, refs_1.resolveIfRef)(spec, (_b = (_a = spec === null || spec === void 0 ? void 0 : spec.components) === null || _a === void 0 ? void 0 : _a.schemas) === null || _b === void 0 ? void 0 : _b[model.name]);
|
|
318
|
+
if (schema) {
|
|
319
|
+
// Object schemas should be typed as the model we will create
|
|
320
|
+
if (schema.type === 'object' && schema.properties) {
|
|
321
|
+
model.type = model.name;
|
|
322
|
+
}
|
|
323
|
+
_ensureModelLinks(spec, modelsByName, model, schema, visited);
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
// Ensure set for all parameters
|
|
327
|
+
data.services.forEach((service) => {
|
|
328
|
+
service.operations.forEach((op) => {
|
|
329
|
+
var _a, _b, _c;
|
|
330
|
+
const specOp = (_b = (_a = spec === null || spec === void 0 ? void 0 : spec.paths) === null || _a === void 0 ? void 0 : _a[op.path]) === null || _b === void 0 ? void 0 : _b[op.method.toLowerCase()];
|
|
331
|
+
const specParametersByName = Object.fromEntries(((_c = specOp === null || specOp === void 0 ? void 0 : specOp.parameters) !== null && _c !== void 0 ? _c : []).map((p) => {
|
|
332
|
+
const param = (0, refs_1.resolveIfRef)(spec, p);
|
|
333
|
+
return [param.name, param];
|
|
334
|
+
}));
|
|
335
|
+
op.parameters.forEach((parameter) => {
|
|
336
|
+
const specParameter = specParametersByName[parameter.prop];
|
|
337
|
+
const specParameterSchema = (0, refs_1.resolveIfRef)(spec, specParameter === null || specParameter === void 0 ? void 0 : specParameter.schema);
|
|
338
|
+
if (specParameterSchema) {
|
|
339
|
+
_ensureModelLinks(spec, modelsByName, parameter, specParameterSchema, visited);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
};
|
|
345
|
+
const _ensureModelLinks = (spec, modelsByName, model, schema, visited) => {
|
|
346
|
+
if (visited.has(model)) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
visited.add(model);
|
|
350
|
+
if (model.export === 'dictionary' &&
|
|
351
|
+
'additionalProperties' in schema &&
|
|
352
|
+
schema.additionalProperties) {
|
|
353
|
+
if ((0, refs_1.isRef)(schema.additionalProperties)) {
|
|
354
|
+
const name = (0, refs_1.splitRef)(schema.additionalProperties.$ref)[2];
|
|
355
|
+
if (modelsByName[name] && !model.link) {
|
|
356
|
+
model.link = modelsByName[name];
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
else if (model.link && typeof schema.additionalProperties !== 'boolean') {
|
|
360
|
+
_ensureModelLinks(spec, modelsByName, (0, types_1.flattenModelLink)(model.link), schema.additionalProperties, visited);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
else if (model.export === 'array' && 'items' in schema && schema.items) {
|
|
364
|
+
if ((0, refs_1.isRef)(schema.items)) {
|
|
365
|
+
const name = (0, refs_1.splitRef)(schema.items.$ref)[2];
|
|
366
|
+
if (modelsByName[name] && !model.link) {
|
|
367
|
+
model.link = modelsByName[name];
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
else if (model.link) {
|
|
371
|
+
_ensureModelLinks(spec, modelsByName, (0, types_1.flattenModelLink)(model.link), schema.items, visited);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
model.properties
|
|
375
|
+
.filter((p) => { var _a; return !visited.has(p) && ((_a = schema.properties) === null || _a === void 0 ? void 0 : _a[(0, lodash_trim_1.default)(p.name, `"'`)]); })
|
|
376
|
+
.forEach((property) => {
|
|
377
|
+
const subSchema = (0, refs_1.resolveIfRef)(spec, schema.properties[(0, lodash_trim_1.default)(property.name, `"'`)]);
|
|
378
|
+
_ensureModelLinks(spec, modelsByName, property, subSchema, visited);
|
|
379
|
+
});
|
|
380
|
+
if (types_1.COMPOSED_SCHEMA_TYPES.has(model.export)) {
|
|
381
|
+
model.properties.forEach((property, i) => {
|
|
382
|
+
var _a;
|
|
383
|
+
const subSchema = (0, refs_1.resolveIfRef)(spec, (_a = schema[(0, lodash_camelcase_1.default)(model.export)]) === null || _a === void 0 ? void 0 : _a[i]);
|
|
384
|
+
if (subSchema) {
|
|
385
|
+
_ensureModelLinks(spec, modelsByName, property, subSchema, visited);
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Mutates the given data to ensure composite models (ie allOf, oneOf, anyOf) have the necessary
|
|
392
|
+
* properties for representing them in generated code. Adds `composedModels` and `composedPrimitives`
|
|
393
|
+
* which contain the models and primitive types that each model is composed of.
|
|
394
|
+
*/
|
|
395
|
+
const ensureCompositeModels = (data) => {
|
|
396
|
+
const visited = new Set();
|
|
397
|
+
data.models.forEach((model) => mutateModelWithCompositeProperties(data, model, visited));
|
|
398
|
+
};
|
|
399
|
+
const mutateModelWithCompositeProperties = (data, model, visited) => {
|
|
400
|
+
if (types_1.COMPOSED_SCHEMA_TYPES.has(model.export) && !visited.has(model)) {
|
|
401
|
+
visited.add(model);
|
|
402
|
+
// Find the models/primitives which this is composed from
|
|
403
|
+
const composedModelReferences = model.properties.filter((p) => !p.name && p.export === 'reference');
|
|
404
|
+
const composedPrimitives = model.properties.filter((p) => !p.name && p.export !== 'reference');
|
|
405
|
+
const modelsByName = Object.fromEntries(data.models.map((m) => [m.name, m]));
|
|
406
|
+
const composedModels = composedModelReferences.flatMap((r) => modelsByName[r.type] ? [modelsByName[r.type]] : []);
|
|
407
|
+
// Recursively resolve composed properties of properties, to ensure mixins for all-of include all recursive all-of properties
|
|
408
|
+
composedModels.forEach((m) => mutateModelWithCompositeProperties(data, m, visited));
|
|
409
|
+
// For all-of models, we include all composed model properties.
|
|
410
|
+
if (model.export === 'all-of') {
|
|
411
|
+
if (composedPrimitives.length > 0) {
|
|
412
|
+
throw new Error(`Schema "${model.name}" defines allOf with non-object types. allOf may only compose object types in the OpenAPI specification.`);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
model.composedModels = composedModels;
|
|
416
|
+
model.composedPrimitives = composedPrimitives;
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* Mutates the given model to add language specific types and names
|
|
421
|
+
*/
|
|
422
|
+
const mutateModelWithAdditionalTypes = (model) => {
|
|
423
|
+
// Trim any surrounding quotes from name
|
|
424
|
+
model.name = (0, lodash_trim_1.default)(model.name, `"'`);
|
|
425
|
+
model.typescriptName = model.name;
|
|
426
|
+
model.typescriptType = (0, languages_1.toTypeScriptType)(model);
|
|
427
|
+
model.pythonName = (0, languages_1.toPythonName)('property', model.name);
|
|
428
|
+
model.pythonType = (0, languages_1.toPythonType)(model);
|
|
429
|
+
model.isPrimitive =
|
|
430
|
+
types_1.PRIMITIVE_TYPES.has(model.type) &&
|
|
431
|
+
!types_1.COMPOSED_SCHEMA_TYPES.has(model.export) &&
|
|
432
|
+
!types_1.COLLECTION_TYPES.has(model.export);
|
|
433
|
+
};
|
|
434
|
+
//# sourceMappingURL=codegen-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen-data.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/open-api/utils/codegen-data.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,iEAA2C;AAE3C,2CAA6D;AAG7D,gFAAyC;AACzC,gFAAyC;AACzC,4EAAqC;AACrC,0EAAmC;AACnC,gFAAyC;AACzC,sEAA+B;AAC/B,iCAAuD;AACvD,6CAA+C;AAC/C,wDAIkC;AAClC,gDAQ8B;AAE9B;;GAEG;AACI,MAAM,uBAAuB,GAAG,CACrC,MAAY,EACU,EAAE;IACxB,mCAAmC;IACnC,MAAM,IAAI,GAAG,IAAA,0CAA8B,EAAC,MAAM,CAAC,CAAC;IAEpD,4EAA4E;IAC5E,MAAM,IAAI,GAAG,MAAM,uBAAuB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AC,WAAW;QACxB,uBAAe,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAC/B,CAAC,6BAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;YACxC,CAAC,wBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Spec } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* In order to ensure we generate models consistently whether or not users used refs or inline schemas,
|
|
4
|
+
* we hoist any inline refs to non-primitives
|
|
5
|
+
*/
|
|
6
|
+
export declare const normaliseOpenApiSpecForCodeGen: (inSpec: Spec) => Spec;
|