@typespec/openapi 1.8.0-dev.0 → 1.8.0-dev.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DecoratorContext, Model, Namespace, Operation, Type } from "@typespec/compiler";
|
|
1
|
+
import type { DecoratorContext, DecoratorValidatorCallbacks, Model, Namespace, Operation, Type } from "@typespec/compiler";
|
|
2
2
|
export interface AdditionalInfo {
|
|
3
3
|
readonly [key: string]: unknown;
|
|
4
4
|
readonly title?: string;
|
|
@@ -39,7 +39,7 @@ export interface ExternalDocs {
|
|
|
39
39
|
* op read(): string;
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export type OperationIdDecorator = (context: DecoratorContext, target: Operation, operationId: string) => void;
|
|
42
|
+
export type OperationIdDecorator = (context: DecoratorContext, target: Operation, operationId: string) => DecoratorValidatorCallbacks | void;
|
|
43
43
|
/**
|
|
44
44
|
* Attach some custom data to the OpenAPI element generated from this type.
|
|
45
45
|
*
|
|
@@ -52,7 +52,7 @@ export type OperationIdDecorator = (context: DecoratorContext, target: Operation
|
|
|
52
52
|
* op read(): string;
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
|
-
export type ExtensionDecorator = (context: DecoratorContext, target: Type, key: string, value: unknown) => void;
|
|
55
|
+
export type ExtensionDecorator = (context: DecoratorContext, target: Type, key: string, value: unknown) => DecoratorValidatorCallbacks | void;
|
|
56
56
|
/**
|
|
57
57
|
* Specify that this model is to be treated as the OpenAPI `default` response.
|
|
58
58
|
* This differs from the compiler built-in `@error` decorator as this does not necessarily represent an error.
|
|
@@ -65,7 +65,7 @@ export type ExtensionDecorator = (context: DecoratorContext, target: Type, key:
|
|
|
65
65
|
* op listPets(): Pet[] | PetStoreResponse;
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export type DefaultResponseDecorator = (context: DecoratorContext, target: Model) => void;
|
|
68
|
+
export type DefaultResponseDecorator = (context: DecoratorContext, target: Model) => DecoratorValidatorCallbacks | void;
|
|
69
69
|
/**
|
|
70
70
|
* Specify the OpenAPI `externalDocs` property for this type.
|
|
71
71
|
*
|
|
@@ -77,14 +77,14 @@ export type DefaultResponseDecorator = (context: DecoratorContext, target: Model
|
|
|
77
77
|
* op listPets(): Pet[];
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
export type ExternalDocsDecorator = (context: DecoratorContext, target: Type, url: string, description?: string) => void;
|
|
80
|
+
export type ExternalDocsDecorator = (context: DecoratorContext, target: Type, url: string, description?: string) => DecoratorValidatorCallbacks | void;
|
|
81
81
|
/**
|
|
82
82
|
* Specify OpenAPI additional information.
|
|
83
83
|
* The service `title` is already specified using `@service`.
|
|
84
84
|
*
|
|
85
85
|
* @param additionalInfo Additional information
|
|
86
86
|
*/
|
|
87
|
-
export type InfoDecorator = (context: DecoratorContext, target: Namespace, additionalInfo: AdditionalInfo) => void;
|
|
87
|
+
export type InfoDecorator = (context: DecoratorContext, target: Namespace, additionalInfo: AdditionalInfo) => DecoratorValidatorCallbacks | void;
|
|
88
88
|
/**
|
|
89
89
|
* Specify OpenAPI additional information.
|
|
90
90
|
*
|
|
@@ -97,7 +97,7 @@ export type InfoDecorator = (context: DecoratorContext, target: Namespace, addit
|
|
|
97
97
|
* namespace PetStore {}
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
export type TagMetadataDecorator = (context: DecoratorContext, target: Namespace, name: string, tagMetadata: TagMetadata) => void;
|
|
100
|
+
export type TagMetadataDecorator = (context: DecoratorContext, target: Namespace, name: string, tagMetadata: TagMetadata) => DecoratorValidatorCallbacks | void;
|
|
101
101
|
export type TypeSpecOpenAPIDecorators = {
|
|
102
102
|
operationId: OperationIdDecorator;
|
|
103
103
|
extension: ExtensionDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeSpec.OpenAPI.d.ts","sourceRoot":"","sources":["../../generated-def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M,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE,oBAAoB,CAAC;IAClC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,eAAe,EAAE,wBAAwB,CAAC;IAC1C,YAAY,EAAE,qBAAqB,CAAC;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/openapi",
|
|
3
|
-
"version": "1.8.0-dev.
|
|
3
|
+
"version": "1.8.0-dev.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec library providing OpenAPI concepts",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"!dist/test/**"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@typespec/compiler": "^1.7.
|
|
42
|
+
"@typespec/compiler": "^1.7.1",
|
|
43
43
|
"@typespec/http": "^1.7.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "~24.10.1",
|
|
47
|
-
"@typespec/compiler": "^1.7.
|
|
47
|
+
"@typespec/compiler": "^1.7.1",
|
|
48
48
|
"@typespec/http": "^1.7.0",
|
|
49
49
|
"@typespec/library-linter": "^0.77.0 || >=0.78.0-dev <0.78.0",
|
|
50
50
|
"@typespec/rest": "^0.77.0 || >=0.78.0-dev <0.78.0",
|