@typespec/openapi 0.54.0-dev.1 → 0.54.0-dev.3
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/README.md +16 -16
- package/dist/src/decorators.d.ts +3 -1
- package/dist/src/decorators.d.ts.map +1 -1
- package/dist/src/decorators.js +22 -2
- package/dist/src/decorators.js.map +1 -1
- package/dist/src/types.d.ts +8 -0
- package/dist/src/types.d.ts.map +1 -1
- package/lib/decorators.tsp +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,14 +54,14 @@ Attach some custom data to the OpenAPI element generated from this type.
|
|
|
54
54
|
|
|
55
55
|
##### Target
|
|
56
56
|
|
|
57
|
-
`
|
|
57
|
+
`unknown`
|
|
58
58
|
|
|
59
59
|
##### Parameters
|
|
60
60
|
|
|
61
|
-
| Name | Type
|
|
62
|
-
| ----- |
|
|
63
|
-
| key | `valueof
|
|
64
|
-
| value | `
|
|
61
|
+
| Name | Type | Description |
|
|
62
|
+
| ----- | ---------------- | ----------------------------------- |
|
|
63
|
+
| key | `valueof string` | Extension key. Must start with `x-` |
|
|
64
|
+
| value | `unknown` | Extension value. |
|
|
65
65
|
|
|
66
66
|
##### Examples
|
|
67
67
|
|
|
@@ -86,14 +86,14 @@ Specify the OpenAPI `externalDocs` property for this type.
|
|
|
86
86
|
|
|
87
87
|
##### Target
|
|
88
88
|
|
|
89
|
-
`
|
|
89
|
+
`unknown`
|
|
90
90
|
|
|
91
91
|
##### Parameters
|
|
92
92
|
|
|
93
|
-
| Name | Type
|
|
94
|
-
| ----------- |
|
|
95
|
-
| url | `valueof
|
|
96
|
-
| description | `valueof
|
|
93
|
+
| Name | Type | Description |
|
|
94
|
+
| ----------- | ---------------- | ----------------------- |
|
|
95
|
+
| url | `valueof string` | Url to the docs |
|
|
96
|
+
| description | `valueof string` | Description of the docs |
|
|
97
97
|
|
|
98
98
|
##### Examples
|
|
99
99
|
|
|
@@ -120,9 +120,9 @@ The service `title` and `version` are already specified using `@service`.
|
|
|
120
120
|
|
|
121
121
|
##### Parameters
|
|
122
122
|
|
|
123
|
-
| Name | Type
|
|
124
|
-
| -------------- |
|
|
125
|
-
| additionalInfo | `
|
|
123
|
+
| Name | Type | Description |
|
|
124
|
+
| -------------- | ----------------------------------- | ---------------------- |
|
|
125
|
+
| additionalInfo | [`AdditionalInfo`](#additionalinfo) | Additional information |
|
|
126
126
|
|
|
127
127
|
#### `@operationId`
|
|
128
128
|
|
|
@@ -138,9 +138,9 @@ Specify the OpenAPI `operationId` property for this operation.
|
|
|
138
138
|
|
|
139
139
|
##### Parameters
|
|
140
140
|
|
|
141
|
-
| Name | Type
|
|
142
|
-
| ----------- |
|
|
143
|
-
| operationId | `valueof
|
|
141
|
+
| Name | Type | Description |
|
|
142
|
+
| ----------- | ---------------- | ------------------- |
|
|
143
|
+
| operationId | `valueof string` | Operation id value. |
|
|
144
144
|
|
|
145
145
|
##### Examples
|
|
146
146
|
|
package/dist/src/decorators.d.ts
CHANGED
|
@@ -30,10 +30,12 @@ export interface ExternalDocs {
|
|
|
30
30
|
/**
|
|
31
31
|
* Allows referencing an external resource for extended documentation.
|
|
32
32
|
* @param url The URL for the target documentation. Value MUST be in the format of a URL.
|
|
33
|
-
* @param
|
|
33
|
+
* @param description A short description of the target documentation.
|
|
34
34
|
*/
|
|
35
35
|
export declare function $externalDocs(context: DecoratorContext, target: Type, url: string, description?: string): void;
|
|
36
36
|
export declare function getExternalDocs(program: Program, entity: Type): ExternalDocs | undefined;
|
|
37
37
|
export declare function $info(context: DecoratorContext, entity: Namespace, model: Model): void;
|
|
38
38
|
export declare function getInfo(program: Program, entity: Namespace): AdditionalInfo | undefined;
|
|
39
|
+
/** Resolve the info entry by merging data specified with `@service`, `@summary` and `@info`. */
|
|
40
|
+
export declare function resolveInfo(program: Program, entity: Namespace): AdditionalInfo | undefined;
|
|
39
41
|
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAIhB,KAAK,EACL,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EAEJ,aAAa,EACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAG5C;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,QAEtF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAEtF;AAID,wBAAgB,UAAU,CACxB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,IAAI,EACZ,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,aAAa,QAerB;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,IAAI,EACZ,aAAa,EAAE,YAAY,EAC3B,IAAI,EAAE,OAAO,QAOd;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,WAAW,CAAC,YAAY,EAAE,GAAG,CAAC,CAE5F;AAYD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,QAIxE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,CAEzE;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,IAAI,EACZ,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,QAOrB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,YAAY,GAAG,SAAS,CAExF;AAGD,wBAAgB,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,QAU/E;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,cAAc,GAAG,SAAS,CAEvF;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,cAAc,GAAG,SAAS,CAW3F"}
|
package/dist/src/decorators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { typespecTypeToJson, } from "@typespec/compiler";
|
|
1
|
+
import { getDoc, getService, getSummary, typespecTypeToJson, } from "@typespec/compiler";
|
|
2
2
|
import { setStatusCode } from "@typespec/http";
|
|
3
3
|
import { createStateSymbol, reportDiagnostic } from "./lib.js";
|
|
4
4
|
export const namespace = "TypeSpec.OpenAPI";
|
|
@@ -71,7 +71,7 @@ const externalDocsKey = createStateSymbol("externalDocs");
|
|
|
71
71
|
/**
|
|
72
72
|
* Allows referencing an external resource for extended documentation.
|
|
73
73
|
* @param url The URL for the target documentation. Value MUST be in the format of a URL.
|
|
74
|
-
* @param
|
|
74
|
+
* @param description A short description of the target documentation.
|
|
75
75
|
*/
|
|
76
76
|
export function $externalDocs(context, target, url, description) {
|
|
77
77
|
const doc = { url };
|
|
@@ -87,9 +87,29 @@ const infoKey = createStateSymbol("info");
|
|
|
87
87
|
export function $info(context, entity, model) {
|
|
88
88
|
const [data, diagnostics] = typespecTypeToJson(model, context.getArgumentTarget(0));
|
|
89
89
|
context.program.reportDiagnostics(diagnostics);
|
|
90
|
+
if (data === undefined) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
90
93
|
context.program.stateMap(infoKey).set(entity, data);
|
|
91
94
|
}
|
|
92
95
|
export function getInfo(program, entity) {
|
|
93
96
|
return program.stateMap(infoKey).get(entity);
|
|
94
97
|
}
|
|
98
|
+
/** Resolve the info entry by merging data specified with `@service`, `@summary` and `@info`. */
|
|
99
|
+
export function resolveInfo(program, entity) {
|
|
100
|
+
var _a, _b, _c, _d;
|
|
101
|
+
const info = getInfo(program, entity);
|
|
102
|
+
const service = getService(program, entity);
|
|
103
|
+
return omitUndefined({
|
|
104
|
+
...info,
|
|
105
|
+
title: (_a = info === null || info === void 0 ? void 0 : info.title) !== null && _a !== void 0 ? _a : service === null || service === void 0 ? void 0 : service.title,
|
|
106
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
107
|
+
version: (_b = info === null || info === void 0 ? void 0 : info.version) !== null && _b !== void 0 ? _b : service === null || service === void 0 ? void 0 : service.version,
|
|
108
|
+
summary: (_c = info === null || info === void 0 ? void 0 : info.summary) !== null && _c !== void 0 ? _c : getSummary(program, entity),
|
|
109
|
+
description: (_d = info === null || info === void 0 ? void 0 : info.description) !== null && _d !== void 0 ? _d : getDoc(program, entity),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function omitUndefined(data) {
|
|
113
|
+
return Object.fromEntries(Object.entries(data).filter(([k, v]) => v !== undefined));
|
|
114
|
+
}
|
|
95
115
|
//# sourceMappingURL=decorators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,UAAU,EACV,U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,WAAW,CAAC,OAAgB,EAAE,MAAiB;;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,OAAO,aAAa,CAAC;QACnB,GAAG,IAAI;QACP,KAAK,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,mCAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK;QACpC,mDAAmD;QACnD,OAAO,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,mCAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;QAC1C,OAAO,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,mCAAI,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC;QACrD,WAAW,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,mCAAI,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1D,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa,CAAoC,IAAO;IAC/D,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAQ,CAAC;AAC7F,CAAC"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -3,6 +3,14 @@ export type ExtensionKey = `x-${string}`;
|
|
|
3
3
|
* OpenAPI additional information
|
|
4
4
|
*/
|
|
5
5
|
export interface AdditionalInfo {
|
|
6
|
+
/** The title of the API. Overrides the `@service` title. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** A short summary of the API. Overrides the `@summary` provided on the service namespace. */
|
|
9
|
+
summary?: string;
|
|
10
|
+
/** A description of the API. Overrides the `@doc` provided on the service namespace. */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version). */
|
|
13
|
+
version?: string;
|
|
6
14
|
/** A URL to the Terms of Service for the API. MUST be in the format of a URL. */
|
|
7
15
|
termsOfService?: string;
|
|
8
16
|
/** The contact information for the exposed API. */
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,MAAM,EAAE,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mFAAmF;IACnF,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,uGAAuG;IACvG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IAEb,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,MAAM,EAAE,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,wIAAwI;IACxI,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mFAAmF;IACnF,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,uGAAuG;IACvG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IAEb,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
|
package/lib/decorators.tsp
CHANGED
|
@@ -63,6 +63,15 @@ extern dec externalDocs(target: unknown, url: valueof string, description?: valu
|
|
|
63
63
|
|
|
64
64
|
/** Additional information for the OpenAPI document. */
|
|
65
65
|
model AdditionalInfo {
|
|
66
|
+
/** The title of the API. Overrides the `@service` title. */
|
|
67
|
+
title?: string;
|
|
68
|
+
|
|
69
|
+
/** A short summary of the API. Overrides the `@summary` provided on the service namespace. */
|
|
70
|
+
summary?: string;
|
|
71
|
+
|
|
72
|
+
/** The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version). */
|
|
73
|
+
version?: string;
|
|
74
|
+
|
|
66
75
|
/** A URL to the Terms of Service for the API. MUST be in the format of a URL. */
|
|
67
76
|
termsOfService?: url;
|
|
68
77
|
|