@loopback/openapi-v3 1.10.2 → 1.13.0
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/CHANGELOG.md +44 -0
- package/dist/controller-spec.js +114 -31
- package/dist/controller-spec.js.map +1 -1
- package/dist/decorators/api.decorator.js +2 -2
- package/dist/decorators/api.decorator.js.map +1 -1
- package/dist/decorators/deprecated.decorator.d.ts +37 -0
- package/dist/decorators/deprecated.decorator.js +71 -0
- package/dist/decorators/deprecated.decorator.js.map +1 -0
- package/dist/decorators/index.d.ts +20 -0
- package/dist/decorators/index.js +24 -0
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/operation.decorator.js +2 -2
- package/dist/decorators/operation.decorator.js.map +1 -1
- package/dist/decorators/parameter.decorator.js +5 -4
- package/dist/decorators/parameter.decorator.js.map +1 -1
- package/dist/decorators/request-body.decorator.js +12 -8
- package/dist/decorators/request-body.decorator.js.map +1 -1
- package/dist/decorators/tags.decorator.d.ts +1 -0
- package/dist/decorators/tags.decorator.js +33 -0
- package/dist/decorators/tags.decorator.js.map +1 -0
- package/dist/enhancers/index.d.ts +3 -0
- package/dist/enhancers/index.js +13 -0
- package/dist/enhancers/index.js.map +1 -0
- package/dist/enhancers/keys.d.ts +6 -0
- package/dist/enhancers/keys.js +12 -0
- package/dist/enhancers/keys.js.map +1 -0
- package/dist/enhancers/spec-enhancer.service.d.ts +73 -0
- package/dist/enhancers/spec-enhancer.service.js +135 -0
- package/dist/enhancers/spec-enhancer.service.js.map +1 -0
- package/dist/enhancers/types.d.ts +18 -0
- package/dist/enhancers/types.js +20 -0
- package/dist/enhancers/types.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/json-to-schema.js +16 -11
- package/dist/json-to-schema.js.map +1 -1
- package/dist/keys.d.ts +17 -1
- package/dist/keys.js +22 -10
- package/dist/keys.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/package.json +11 -10
- package/src/controller-spec.ts +136 -21
- package/src/decorators/api.decorator.ts +1 -1
- package/src/decorators/deprecated.decorator.ts +87 -0
- package/src/decorators/index.ts +30 -0
- package/src/decorators/operation.decorator.ts +1 -1
- package/src/decorators/parameter.decorator.ts +2 -2
- package/src/decorators/request-body.decorator.ts +4 -4
- package/src/decorators/tags.decorator.ts +46 -0
- package/src/enhancers/index.ts +8 -0
- package/src/enhancers/keys.ts +14 -0
- package/src/enhancers/spec-enhancer.service.ts +121 -0
- package/src/enhancers/types.ts +30 -0
- package/src/index.ts +1 -0
- package/src/json-to-schema.ts +14 -8
- package/src/keys.ts +33 -6
- package/src/types.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,50 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.13.0](https://github.com/strongloop/loopback-next/compare/@loopback/openapi-v3@1.12.0...@loopback/openapi-v3@1.13.0) (2020-02-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* adds [@oas](https://github.com/oas).deprecated() decorator ([6b6b5f0](https://github.com/strongloop/loopback-next/commit/6b6b5f05d224053d6a9735a506841d19b7331dac))
|
|
12
|
+
* adds [@oas](https://github.com/oas).tags convenience decorator ([a8722dc](https://github.com/strongloop/loopback-next/commit/a8722dc68838344684a5d3de76fa6915e08d2e56))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# [1.12.0](https://github.com/strongloop/loopback-next/compare/@loopback/openapi-v3@1.11.0...@loopback/openapi-v3@1.12.0) (2020-01-27)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* support x-ts-type in anyOf/allOf/oneOf/not ([28fcc54](https://github.com/strongloop/loopback-next/commit/28fcc545e42d4c5ae88215436b873a78a3fb6c8d))
|
|
24
|
+
* **openapi-v3:** add support for `anyOf` and `oneOf` on the `jsonToSchemaObject` utility ([72ba132](https://github.com/strongloop/loopback-next/commit/72ba1321a85112a3e085d62fe573f60f79d5c64c)), closes [#3524](https://github.com/strongloop/loopback-next/issues/3524)
|
|
25
|
+
* **repository-json-schema:** add title to filter schemas ([6105883](https://github.com/strongloop/loopback-next/commit/6105883967ca5853cc8990f423d9febd1eb07101))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# [1.11.0](https://github.com/strongloop/loopback-next/compare/@loopback/openapi-v3@1.10.3...@loopback/openapi-v3@1.11.0) (2020-01-07)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* openapi spec contributor extension point ([9fee3f3](https://github.com/strongloop/loopback-next/commit/9fee3f342ff76d65d1899ddf1dbf7a257c85ea26))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [1.10.3](https://github.com/strongloop/loopback-next/compare/@loopback/openapi-v3@1.10.2...@loopback/openapi-v3@1.10.3) (2019-12-09)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @loopback/openapi-v3
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
6
50
|
## [1.10.2](https://github.com/strongloop/loopback-next/compare/@loopback/openapi-v3@1.10.1...@loopback/openapi-v3@1.10.2) (2019-11-25)
|
|
7
51
|
|
|
8
52
|
**Note:** Version bump only for package @loopback/openapi-v3
|
package/dist/controller-spec.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const
|
|
7
|
+
const core_1 = require("@loopback/core");
|
|
8
8
|
const repository_json_schema_1 = require("@loopback/repository-json-schema");
|
|
9
|
-
const
|
|
9
|
+
const lodash_1 = require("lodash");
|
|
10
10
|
const generate_schema_1 = require("./generate-schema");
|
|
11
11
|
const json_to_schema_1 = require("./json-to-schema");
|
|
12
12
|
const keys_1 = require("./keys");
|
|
@@ -18,22 +18,59 @@ exports.TS_TYPE_KEY = 'x-ts-type';
|
|
|
18
18
|
* @param constructor - Controller class
|
|
19
19
|
*/
|
|
20
20
|
function resolveControllerSpec(constructor) {
|
|
21
|
+
var _a, _b, _c, _d;
|
|
21
22
|
debug(`Retrieving OpenAPI specification for controller ${constructor.name}`);
|
|
22
|
-
let spec =
|
|
23
|
+
let spec = core_1.MetadataInspector.getClassMetadata(keys_1.OAI3Keys.CLASS_KEY, constructor);
|
|
23
24
|
if (spec) {
|
|
24
25
|
debug(' using class-level spec defined via @api()', spec);
|
|
25
|
-
spec =
|
|
26
|
+
spec = core_1.DecoratorFactory.cloneDeep(spec);
|
|
26
27
|
}
|
|
27
28
|
else {
|
|
28
29
|
spec = { paths: {} };
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
const isClassDeprecated = core_1.MetadataInspector.getClassMetadata(keys_1.OAI3Keys.DEPRECATED_CLASS_KEY, constructor);
|
|
32
|
+
if (isClassDeprecated) {
|
|
33
|
+
debug(' using class-level @deprecated()');
|
|
34
|
+
}
|
|
35
|
+
const classTags = core_1.MetadataInspector.getClassMetadata(keys_1.OAI3Keys.TAGS_CLASS_KEY, constructor);
|
|
36
|
+
if (classTags) {
|
|
37
|
+
debug(' using class-level @oas.tags()');
|
|
38
|
+
}
|
|
39
|
+
if (classTags || isClassDeprecated) {
|
|
40
|
+
for (const path of Object.keys(spec.paths)) {
|
|
41
|
+
for (const method of Object.keys(spec.paths[path])) {
|
|
42
|
+
/* istanbul ignore else */
|
|
43
|
+
if (isClassDeprecated) {
|
|
44
|
+
spec.paths[path][method].deprecated = true;
|
|
45
|
+
}
|
|
46
|
+
/* istanbul ignore else */
|
|
47
|
+
if (classTags) {
|
|
48
|
+
if (spec.paths[path][method].tags &&
|
|
49
|
+
spec.paths[path][method].tags.length) {
|
|
50
|
+
spec.paths[path][method].tags = spec.paths[path][method].tags.concat(classTags.tags);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
spec.paths[path][method].tags = classTags.tags;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
let endpoints = (_a = core_1.MetadataInspector.getAllMethodMetadata(keys_1.OAI3Keys.METHODS_KEY, constructor.prototype), (_a !== null && _a !== void 0 ? _a : {}));
|
|
60
|
+
endpoints = core_1.DecoratorFactory.cloneDeep(endpoints);
|
|
32
61
|
for (const op in endpoints) {
|
|
33
62
|
debug(' processing method %s', op);
|
|
34
63
|
const endpoint = endpoints[op];
|
|
35
64
|
const verb = endpoint.verb;
|
|
36
65
|
const path = endpoint.path;
|
|
66
|
+
const isMethodDeprecated = core_1.MetadataInspector.getMethodMetadata(keys_1.OAI3Keys.DEPRECATED_METHOD_KEY, constructor.prototype, op);
|
|
67
|
+
if (isMethodDeprecated) {
|
|
68
|
+
debug(' using method-level deprecation via @deprecated()');
|
|
69
|
+
}
|
|
70
|
+
const methodTags = core_1.MetadataInspector.getMethodMetadata(keys_1.OAI3Keys.TAGS_METHOD_KEY, constructor.prototype, op);
|
|
71
|
+
if (methodTags) {
|
|
72
|
+
debug(' using method-level tags via @oas.tags()');
|
|
73
|
+
}
|
|
37
74
|
let endpointName = '';
|
|
38
75
|
/* istanbul ignore if */
|
|
39
76
|
if (debug.enabled) {
|
|
@@ -54,23 +91,39 @@ function resolveControllerSpec(constructor) {
|
|
|
54
91
|
};
|
|
55
92
|
endpoint.spec = operationSpec;
|
|
56
93
|
}
|
|
94
|
+
if (classTags && !operationSpec.tags) {
|
|
95
|
+
operationSpec.tags = classTags.tags;
|
|
96
|
+
}
|
|
97
|
+
if (methodTags) {
|
|
98
|
+
if (operationSpec.tags && operationSpec.tags.length) {
|
|
99
|
+
operationSpec.tags = operationSpec.tags.concat(methodTags.tags);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
operationSpec.tags = methodTags.tags;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
57
105
|
debug(' operation for method %s: %j', op, endpoint);
|
|
58
106
|
debug(' spec responses for method %s: %o', op, operationSpec.responses);
|
|
107
|
+
// Prescedence: method decorator > class decorator > operationSpec > undefined
|
|
108
|
+
const deprecationSpec = (_c = (_b = (isMethodDeprecated !== null && isMethodDeprecated !== void 0 ? isMethodDeprecated : isClassDeprecated), (_b !== null && _b !== void 0 ? _b : operationSpec.deprecated)), (_c !== null && _c !== void 0 ? _c : false));
|
|
109
|
+
if (deprecationSpec) {
|
|
110
|
+
operationSpec.deprecated = true;
|
|
111
|
+
}
|
|
59
112
|
for (const code in operationSpec.responses) {
|
|
60
113
|
const responseObject = operationSpec.responses[code];
|
|
61
114
|
if (types_1.isReferenceObject(responseObject))
|
|
62
115
|
continue;
|
|
63
|
-
const content = responseObject.content
|
|
116
|
+
const content = (_d = responseObject.content, (_d !== null && _d !== void 0 ? _d : {}));
|
|
64
117
|
for (const c in content) {
|
|
65
118
|
debug(' processing response code %s with content-type %', code, c);
|
|
66
119
|
processSchemaExtensions(spec, content[c].schema);
|
|
67
120
|
}
|
|
68
121
|
}
|
|
69
122
|
debug(' processing parameters for method %s', op);
|
|
70
|
-
let params =
|
|
123
|
+
let params = core_1.MetadataInspector.getAllParameterMetadata(keys_1.OAI3Keys.PARAMETERS_KEY, constructor.prototype, op);
|
|
71
124
|
debug(' parameters for method %s: %j', op, params);
|
|
72
125
|
if (params != null) {
|
|
73
|
-
params =
|
|
126
|
+
params = core_1.DecoratorFactory.cloneDeep(params);
|
|
74
127
|
/**
|
|
75
128
|
* If a controller method uses dependency injection, the parameters
|
|
76
129
|
* might be sparse. For example,
|
|
@@ -94,7 +147,7 @@ function resolveControllerSpec(constructor) {
|
|
|
94
147
|
});
|
|
95
148
|
}
|
|
96
149
|
debug(' processing requestBody for method %s', op);
|
|
97
|
-
let requestBodies =
|
|
150
|
+
let requestBodies = core_1.MetadataInspector.getAllParameterMetadata(keys_1.OAI3Keys.REQUEST_BODY_KEY, constructor.prototype, op);
|
|
98
151
|
if (requestBodies != null)
|
|
99
152
|
requestBodies = requestBodies.filter(p => p != null);
|
|
100
153
|
let requestBody;
|
|
@@ -103,8 +156,10 @@ function resolveControllerSpec(constructor) {
|
|
|
103
156
|
throw new Error('An operation should only have one parameter decorated by @requestBody');
|
|
104
157
|
requestBody = requestBodies[0];
|
|
105
158
|
debug(' requestBody for method %s: %j', op, requestBody);
|
|
159
|
+
/* istanbul ignore else */
|
|
106
160
|
if (requestBody) {
|
|
107
161
|
operationSpec.requestBody = requestBody;
|
|
162
|
+
/* istanbul ignore else */
|
|
108
163
|
const content = requestBody.content || {};
|
|
109
164
|
for (const mediaType in content) {
|
|
110
165
|
processSchemaExtensions(spec, content[mediaType].schema);
|
|
@@ -133,9 +188,9 @@ function resolveControllerSpec(constructor) {
|
|
|
133
188
|
debug(` adding ${endpointName}`, operationSpec);
|
|
134
189
|
spec.paths[path][verb] = operationSpec;
|
|
135
190
|
debug(` inferring schema object for method %s`, op);
|
|
136
|
-
const opMetadata =
|
|
191
|
+
const opMetadata = core_1.MetadataInspector.getDesignTypeForMethod(constructor.prototype, op);
|
|
137
192
|
const paramTypes = opMetadata.parameterTypes;
|
|
138
|
-
const isComplexType = (ctor) => !
|
|
193
|
+
const isComplexType = (ctor) => !lodash_1.includes([String, Number, Boolean, Array, Object], ctor);
|
|
139
194
|
for (const p of paramTypes) {
|
|
140
195
|
if (isComplexType(p)) {
|
|
141
196
|
generateOpenAPISchema(spec, p);
|
|
@@ -144,6 +199,7 @@ function resolveControllerSpec(constructor) {
|
|
|
144
199
|
}
|
|
145
200
|
return spec;
|
|
146
201
|
}
|
|
202
|
+
const SCHEMA_ARR_KEYS = ['allOf', 'anyOf', 'oneOf'];
|
|
147
203
|
/**
|
|
148
204
|
* Resolve the x-ts-type in the schema object
|
|
149
205
|
* @param spec - Controller spec
|
|
@@ -155,25 +211,52 @@ function processSchemaExtensions(spec, schema) {
|
|
|
155
211
|
return;
|
|
156
212
|
assignRelatedSchemas(spec, schema.definitions);
|
|
157
213
|
delete schema.definitions;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
generateOpenAPISchema(spec, tsType);
|
|
166
|
-
// We don't want a Function type in the final spec.
|
|
167
|
-
delete schema[exports.TS_TYPE_KEY];
|
|
168
|
-
return;
|
|
214
|
+
/**
|
|
215
|
+
* check if we have been provided a `not`
|
|
216
|
+
* `not` is valid in many cases- here we're checking for
|
|
217
|
+
* `not: { schema: {'x-ts-type': SomeModel }}
|
|
218
|
+
*/
|
|
219
|
+
if (schema.not) {
|
|
220
|
+
processSchemaExtensions(spec, schema.not);
|
|
169
221
|
}
|
|
170
|
-
|
|
171
|
-
|
|
222
|
+
/**
|
|
223
|
+
* check for schema.allOf, schema.oneOf, schema.anyOf arrays first.
|
|
224
|
+
* You cannot provide BOTH a defnintion AND one of these keywords.
|
|
225
|
+
*/
|
|
226
|
+
/* istanbul ignore else */
|
|
227
|
+
const hasOwn = (prop) => { var _a; return (_a = schema) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(prop); };
|
|
228
|
+
if (SCHEMA_ARR_KEYS.some(k => hasOwn(k))) {
|
|
229
|
+
SCHEMA_ARR_KEYS.forEach((k) => {
|
|
230
|
+
var _a;
|
|
231
|
+
/* istanbul ignore else */
|
|
232
|
+
if (((_a = schema) === null || _a === void 0 ? void 0 : _a[k]) && Array.isArray(schema[k])) {
|
|
233
|
+
schema[k].forEach((r) => {
|
|
234
|
+
processSchemaExtensions(spec, r);
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
});
|
|
172
238
|
}
|
|
173
|
-
else
|
|
174
|
-
if (schema
|
|
175
|
-
|
|
176
|
-
|
|
239
|
+
else {
|
|
240
|
+
if (types_1.isReferenceObject(schema))
|
|
241
|
+
return;
|
|
242
|
+
const tsType = schema[exports.TS_TYPE_KEY];
|
|
243
|
+
debug(' %s => %o', exports.TS_TYPE_KEY, tsType);
|
|
244
|
+
if (tsType) {
|
|
245
|
+
schema = generate_schema_1.resolveSchema(tsType, schema);
|
|
246
|
+
if (schema.$ref)
|
|
247
|
+
generateOpenAPISchema(spec, tsType);
|
|
248
|
+
// We don't want a Function type in the final spec.
|
|
249
|
+
delete schema[exports.TS_TYPE_KEY];
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (schema.type === 'array') {
|
|
253
|
+
processSchemaExtensions(spec, schema.items);
|
|
254
|
+
}
|
|
255
|
+
else if (schema.type === 'object') {
|
|
256
|
+
if (schema.properties) {
|
|
257
|
+
for (const p in schema.properties) {
|
|
258
|
+
processSchemaExtensions(spec, schema.properties[p]);
|
|
259
|
+
}
|
|
177
260
|
}
|
|
178
261
|
}
|
|
179
262
|
}
|
|
@@ -232,10 +315,10 @@ function assignRelatedSchemas(spec, definitions) {
|
|
|
232
315
|
* @param constructor - Controller class
|
|
233
316
|
*/
|
|
234
317
|
function getControllerSpec(constructor) {
|
|
235
|
-
let spec =
|
|
318
|
+
let spec = core_1.MetadataInspector.getClassMetadata(keys_1.OAI3Keys.CONTROLLER_SPEC_KEY, constructor, { ownMetadataOnly: true });
|
|
236
319
|
if (!spec) {
|
|
237
320
|
spec = resolveControllerSpec(constructor);
|
|
238
|
-
|
|
321
|
+
core_1.MetadataInspector.defineMetadata(keys_1.OAI3Keys.CONTROLLER_SPEC_KEY.key, spec, constructor);
|
|
239
322
|
}
|
|
240
323
|
return spec;
|
|
241
324
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-spec.js","sourceRoot":"","sources":["../src/controller-spec.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD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F,IAAI,CAAC,IAAI,EAAE;QACT,IAAI,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;QAC1C,wBAAiB,CAAC,cAAc,CAC9B,eAAQ,CAAC,mBAAmB,CAAC,GAAG,EAChC,IAAI,EACJ,WAAW,CACZ,CAAC;KACH;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAfD,8CAeC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAgB,iBAAiB,CAC/B,SAAoC,EACpC,OAA8B;IAE9B,MAAM,UAAU,GAAG,yCAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,OAAO,mCAAkB,CAAC,UAAU,CAAc,CAAC;AACrD,CAAC;AAND,8CAMC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const
|
|
7
|
+
const core_1 = require("@loopback/core");
|
|
8
8
|
const keys_1 = require("../keys");
|
|
9
9
|
/**
|
|
10
10
|
* Decorate the given Controller constructor with metadata describing
|
|
@@ -26,7 +26,7 @@ const keys_1 = require("../keys");
|
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
function api(spec) {
|
|
29
|
-
return
|
|
29
|
+
return core_1.ClassDecoratorFactory.createDecorator(keys_1.OAI3Keys.CLASS_KEY, spec, { decoratorName: '@api' });
|
|
30
30
|
}
|
|
31
31
|
exports.api = api;
|
|
32
32
|
//# sourceMappingURL=api.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.decorator.js","sourceRoot":"","sources":["../../src/decorators/api.decorator.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;AAEhE
|
|
1
|
+
{"version":3,"file":"api.decorator.js","sourceRoot":"","sources":["../../src/decorators/api.decorator.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;AAEhE,yCAAqD;AAErD,kCAAiC;AAEjC;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,GAAG,CAAC,IAAoB;IACtC,OAAO,4BAAqB,CAAC,eAAe,CAC1C,eAAQ,CAAC,SAAS,EAClB,IAAI,EACJ,EAAC,aAAa,EAAE,MAAM,EAAC,CACxB,CAAC;AACJ,CAAC;AAND,kBAMC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marks an api path as deprecated. When applied to a class, this decorator
|
|
3
|
+
* marks all paths as deprecated.
|
|
4
|
+
*
|
|
5
|
+
* You can optionally mark all controllers in a class as deprecated, but use
|
|
6
|
+
* `@deprecated(false)` on a specific method to ensure it is not marked
|
|
7
|
+
* as deprecated in the specification.
|
|
8
|
+
*
|
|
9
|
+
* @param isDeprecated - whether or not the path should be marked as deprecated.
|
|
10
|
+
* This is useful for marking a class as deprecated, but a method as
|
|
11
|
+
* not deprecated.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* @oas.deprecated()
|
|
16
|
+
* class MyController {
|
|
17
|
+
* @get('/greet')
|
|
18
|
+
* public async function greet() {
|
|
19
|
+
* return 'Hello, World!'
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @get('/greet-v2')
|
|
23
|
+
* @oas.deprecated(false)
|
|
24
|
+
* public async function greetV2() {
|
|
25
|
+
* return 'Hello, World!'
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* class MyOtherController {
|
|
30
|
+
* @get('/echo')
|
|
31
|
+
* public async function echo() {
|
|
32
|
+
* return 'Echo!'
|
|
33
|
+
* }
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function deprecated(isDeprecated?: boolean): (target: any, method?: string | undefined, methodDescriptor?: TypedPropertyDescriptor<any> | undefined) => any;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2018. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/openapi-v3
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const core_1 = require("@loopback/core");
|
|
8
|
+
const keys_1 = require("../keys");
|
|
9
|
+
const debug = require('debug')('loopback:openapi3:metadata:controller-spec:deprecated');
|
|
10
|
+
/**
|
|
11
|
+
* Marks an api path as deprecated. When applied to a class, this decorator
|
|
12
|
+
* marks all paths as deprecated.
|
|
13
|
+
*
|
|
14
|
+
* You can optionally mark all controllers in a class as deprecated, but use
|
|
15
|
+
* `@deprecated(false)` on a specific method to ensure it is not marked
|
|
16
|
+
* as deprecated in the specification.
|
|
17
|
+
*
|
|
18
|
+
* @param isDeprecated - whether or not the path should be marked as deprecated.
|
|
19
|
+
* This is useful for marking a class as deprecated, but a method as
|
|
20
|
+
* not deprecated.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* @oas.deprecated()
|
|
25
|
+
* class MyController {
|
|
26
|
+
* @get('/greet')
|
|
27
|
+
* public async function greet() {
|
|
28
|
+
* return 'Hello, World!'
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* @get('/greet-v2')
|
|
32
|
+
* @oas.deprecated(false)
|
|
33
|
+
* public async function greetV2() {
|
|
34
|
+
* return 'Hello, World!'
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
*
|
|
38
|
+
* class MyOtherController {
|
|
39
|
+
* @get('/echo')
|
|
40
|
+
* public async function echo() {
|
|
41
|
+
* return 'Echo!'
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
function deprecated(isDeprecated = true) {
|
|
47
|
+
return function deprecatedDecoratorForClassOrMethod(
|
|
48
|
+
// Class or a prototype
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
+
target, method,
|
|
51
|
+
// Use `any` to for `TypedPropertyDescriptor`
|
|
52
|
+
// See https://github.com/strongloop/loopback-next/pull/2704
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
+
methodDescriptor) {
|
|
55
|
+
debug(target, method, methodDescriptor);
|
|
56
|
+
if (method && methodDescriptor) {
|
|
57
|
+
// Method
|
|
58
|
+
return core_1.MethodDecoratorFactory.createDecorator(keys_1.OAI3Keys.DEPRECATED_METHOD_KEY, isDeprecated, { decoratorName: '@oas.deprecated' })(target, method, methodDescriptor);
|
|
59
|
+
}
|
|
60
|
+
else if (typeof target === 'function' && !method && !methodDescriptor) {
|
|
61
|
+
// Class
|
|
62
|
+
return core_1.ClassDecoratorFactory.createDecorator(keys_1.OAI3Keys.DEPRECATED_CLASS_KEY, isDeprecated, { decoratorName: '@oas.deprecated' })(target);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
throw new Error('@oas.deprecated cannot be used on a property: ' +
|
|
66
|
+
core_1.DecoratorFactory.getTargetName(target, method, methodDescriptor));
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
exports.deprecated = deprecated;
|
|
71
|
+
//# sourceMappingURL=deprecated.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated.decorator.js","sourceRoot":"","sources":["../../src/decorators/deprecated.decorator.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;AAEhE,yCAIwB;AACxB,kCAAiC;AAEjC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAC5B,uDAAuD,CACxD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,SAAgB,UAAU,CAAC,YAAY,GAAG,IAAI;IAC5C,OAAO,SAAS,mCAAmC;IACjD,uBAAuB;IACvB,8DAA8D;IAC9D,MAAW,EACX,MAAe;IACf,6CAA6C;IAC7C,4DAA4D;IAC5D,8DAA8D;IAC9D,gBAA+C;QAE/C,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAExC,IAAI,MAAM,IAAI,gBAAgB,EAAE;YAC9B,SAAS;YACT,OAAO,6BAAsB,CAAC,eAAe,CAC3C,eAAQ,CAAC,qBAAqB,EAC9B,YAAY,EACZ,EAAC,aAAa,EAAE,iBAAiB,EAAC,CACnC,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;SACrC;aAAM,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,MAAM,IAAI,CAAC,gBAAgB,EAAE;YACvE,QAAQ;YACR,OAAO,4BAAqB,CAAC,eAAe,CAC1C,eAAQ,CAAC,oBAAoB,EAC7B,YAAY,EACZ,EAAC,aAAa,EAAE,iBAAiB,EAAC,CACnC,CAAC,MAAM,CAAC,CAAC;SACX;aAAM;YACL,MAAM,IAAI,KAAK,CACb,gDAAgD;gBAC9C,uBAAgB,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CACnE,CAAC;SACH;IACH,CAAC,CAAC;AACJ,CAAC;AAlCD,gCAkCC"}
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
export * from './api.decorator';
|
|
2
|
+
export * from './deprecated.decorator';
|
|
2
3
|
export * from './operation.decorator';
|
|
3
4
|
export * from './parameter.decorator';
|
|
4
5
|
export * from './request-body.decorator';
|
|
6
|
+
import { api } from './api.decorator';
|
|
7
|
+
import { deprecated } from './deprecated.decorator';
|
|
8
|
+
import { del, get, operation, patch, post, put } from './operation.decorator';
|
|
9
|
+
import { param } from './parameter.decorator';
|
|
10
|
+
import { requestBody } from './request-body.decorator';
|
|
11
|
+
import { tags } from './tags.decorator';
|
|
12
|
+
export declare const oas: {
|
|
13
|
+
api: typeof api;
|
|
14
|
+
operation: typeof operation;
|
|
15
|
+
get: typeof get;
|
|
16
|
+
post: typeof post;
|
|
17
|
+
del: typeof del;
|
|
18
|
+
patch: typeof patch;
|
|
19
|
+
put: typeof put;
|
|
20
|
+
param: typeof param;
|
|
21
|
+
requestBody: typeof requestBody;
|
|
22
|
+
deprecated: typeof deprecated;
|
|
23
|
+
tags: typeof tags;
|
|
24
|
+
};
|
package/dist/decorators/index.js
CHANGED
|
@@ -8,7 +8,31 @@ function __export(m) {
|
|
|
8
8
|
}
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
__export(require("./api.decorator"));
|
|
11
|
+
__export(require("./deprecated.decorator"));
|
|
11
12
|
__export(require("./operation.decorator"));
|
|
12
13
|
__export(require("./parameter.decorator"));
|
|
13
14
|
__export(require("./request-body.decorator"));
|
|
15
|
+
const api_decorator_1 = require("./api.decorator");
|
|
16
|
+
const deprecated_decorator_1 = require("./deprecated.decorator");
|
|
17
|
+
const operation_decorator_1 = require("./operation.decorator");
|
|
18
|
+
const parameter_decorator_1 = require("./parameter.decorator");
|
|
19
|
+
const request_body_decorator_1 = require("./request-body.decorator");
|
|
20
|
+
const tags_decorator_1 = require("./tags.decorator");
|
|
21
|
+
exports.oas = {
|
|
22
|
+
api: api_decorator_1.api,
|
|
23
|
+
operation: operation_decorator_1.operation,
|
|
24
|
+
// methods
|
|
25
|
+
get: operation_decorator_1.get,
|
|
26
|
+
post: operation_decorator_1.post,
|
|
27
|
+
del: operation_decorator_1.del,
|
|
28
|
+
patch: operation_decorator_1.patch,
|
|
29
|
+
put: operation_decorator_1.put,
|
|
30
|
+
//param
|
|
31
|
+
param: parameter_decorator_1.param,
|
|
32
|
+
// request body
|
|
33
|
+
requestBody: request_body_decorator_1.requestBody,
|
|
34
|
+
// oas convenience decorators
|
|
35
|
+
deprecated: deprecated_decorator_1.deprecated,
|
|
36
|
+
tags: tags_decorator_1.tags,
|
|
37
|
+
};
|
|
14
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;;;;AAEhE,qCAAgC;AAChC,2CAAsC;AACtC,2CAAsC;AACtC,8CAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;;;;AAEhE,qCAAgC;AAChC,4CAAuC;AACvC,2CAAsC;AACtC,2CAAsC;AACtC,8CAAyC;AAEzC,mDAAoC;AACpC,iEAAkD;AAClD,+DAA4E;AAC5E,+DAA4C;AAC5C,qEAAqD;AACrD,qDAAsC;AAEzB,QAAA,GAAG,GAAG;IACjB,GAAG,EAAH,mBAAG;IACH,SAAS,EAAT,+BAAS;IAET,UAAU;IACV,GAAG,EAAH,yBAAG;IACH,IAAI,EAAJ,0BAAI;IACJ,GAAG,EAAH,yBAAG;IACH,KAAK,EAAL,2BAAK;IACL,GAAG,EAAH,yBAAG;IAEH,OAAO;IACP,KAAK,EAAL,2BAAK;IAEL,eAAe;IACf,WAAW,EAAX,oCAAW;IAEX,6BAA6B;IAC7B,UAAU,EAAV,iCAAU;IACV,IAAI,EAAJ,qBAAI;CACL,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const
|
|
7
|
+
const core_1 = require("@loopback/core");
|
|
8
8
|
const keys_1 = require("../keys");
|
|
9
9
|
/**
|
|
10
10
|
* Expose a Controller method as a REST API operation
|
|
@@ -75,7 +75,7 @@ exports.del = del;
|
|
|
75
75
|
* of this operation.
|
|
76
76
|
*/
|
|
77
77
|
function operation(verb, path, spec) {
|
|
78
|
-
return
|
|
78
|
+
return core_1.MethodDecoratorFactory.createDecorator(keys_1.OAI3Keys.METHODS_KEY, {
|
|
79
79
|
verb,
|
|
80
80
|
path,
|
|
81
81
|
spec,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.decorator.js","sourceRoot":"","sources":["../../src/decorators/operation.decorator.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;AAEhE
|
|
1
|
+
{"version":3,"file":"operation.decorator.js","sourceRoot":"","sources":["../../src/decorators/operation.decorator.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;AAEhE,yCAAsD;AAEtD,kCAAiC;AAGjC;;;;;;;GAOG;AACH,SAAgB,GAAG,CAAC,IAAY,EAAE,IAAsB;IACtD,OAAO,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC;AAFD,kBAEC;AAED;;;;;;;GAOG;AACH,SAAgB,IAAI,CAAC,IAAY,EAAE,IAAsB;IACvD,OAAO,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAFD,oBAEC;AAED;;;;;;;GAOG;AACH,SAAgB,GAAG,CAAC,IAAY,EAAE,IAAsB;IACtD,OAAO,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC;AAFD,kBAEC;AAED;;;;;;;GAOG;AACH,SAAgB,KAAK,CAAC,IAAY,EAAE,IAAsB;IACxD,OAAO,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC;AAFD,sBAEC;AAED;;;;;;;GAOG;AACH,SAAgB,GAAG,CAAC,IAAY,EAAE,IAAsB;IACtD,OAAO,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC;AAFD,kBAEC;AAED;;;;;;;GAOG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,IAAY,EAAE,IAAsB;IAC1E,OAAO,6BAAsB,CAAC,eAAe,CAC3C,eAAQ,CAAC,WAAW,EACpB;QACE,IAAI;QACJ,IAAI;QACJ,IAAI;KACL,EACD,EAAC,aAAa,EAAE,YAAY,EAAC,CAC9B,CAAC;AACJ,CAAC;AAVD,8BAUC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// This file is licensed under the MIT License.
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const
|
|
7
|
+
const core_1 = require("@loopback/core");
|
|
8
8
|
const generate_schema_1 = require("../generate-schema");
|
|
9
9
|
const keys_1 = require("../keys");
|
|
10
10
|
const types_1 = require("../types");
|
|
@@ -28,10 +28,11 @@ const types_1 = require("../types");
|
|
|
28
28
|
*/
|
|
29
29
|
function param(paramSpec) {
|
|
30
30
|
return function (target, member, index) {
|
|
31
|
+
var _a;
|
|
31
32
|
paramSpec = paramSpec || {};
|
|
32
33
|
// Get the design time method parameter metadata
|
|
33
|
-
const methodSig =
|
|
34
|
-
const paramTypes = (methodSig
|
|
34
|
+
const methodSig = core_1.MetadataInspector.getDesignTypeForMethod(target, member);
|
|
35
|
+
const paramTypes = ((_a = methodSig) === null || _a === void 0 ? void 0 : _a.parameterTypes) || [];
|
|
35
36
|
// Map design-time parameter type to the OpenAPI param type
|
|
36
37
|
const paramType = paramTypes[index];
|
|
37
38
|
if (paramType) {
|
|
@@ -52,7 +53,7 @@ function param(paramSpec) {
|
|
|
52
53
|
throw new Error(`The parameter type is set to 'array' but the JavaScript type is ${paramType.name}`);
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
+
core_1.ParameterDecoratorFactory.createDecorator(keys_1.OAI3Keys.PARAMETERS_KEY, paramSpec, { decoratorName: '@param' })(target, member, index);
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
exports.param = param;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter.decorator.js","sourceRoot":"","sources":["../../src/decorators/parameter.decorator.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;AAEhE
|
|
1
|
+
{"version":3,"file":"parameter.decorator.js","sourceRoot":"","sources":["../../src/decorators/parameter.decorator.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,oCAAoC;AACpC,+CAA+C;AAC/C,gEAAgE;;AAEhE,yCAA4E;AAC5E,wDAAiD;AACjD,kCAAiC;AACjC,oCAMkB;AAElB;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,KAAK,CAAC,SAA0B;IAC9C,OAAO,UAAS,MAAc,EAAE,MAAc,EAAE,KAAa;;QAC3D,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;QAC5B,gDAAgD;QAChD,MAAM,SAAS,GAAG,wBAAiB,CAAC,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3E,MAAM,UAAU,GAAG,OAAA,SAAS,0CAAE,cAAc,KAAI,EAAE,CAAC;QAEnD,2DAA2D;QAE3D,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAEpC,IAAI,SAAS,EAAE;YACb;YACE,iDAAiD;YACjD,CAAC,SAAS,CAAC,MAAM;gBACjB,iEAAiE;gBACjE,CAAC,sBAAc,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAC5D;gBACA,yEAAyE;gBACzE,SAAS,CAAC,MAAM,GAAG,+BAAa,CAAC,SAAS,EAAE,SAAS,CAAC,MAA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