@azure-tools/typespec-autorest 0.44.0 → 0.45.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.
- package/dist/generated-defs/Autorest.d.ts +19 -0
- package/dist/generated-defs/Autorest.d.ts.map +1 -0
- package/dist/generated-defs/Autorest.js +2 -0
- package/dist/generated-defs/Autorest.js.map +1 -0
- package/dist/generated-defs/Autorest.ts-test.d.ts +2 -0
- package/dist/generated-defs/Autorest.ts-test.d.ts.map +1 -0
- package/dist/generated-defs/Autorest.ts-test.js +8 -0
- package/dist/generated-defs/Autorest.ts-test.js.map +1 -0
- package/dist/src/decorators.d.ts +4 -3
- package/dist/src/decorators.d.ts.map +1 -1
- package/dist/src/decorators.js +12 -14
- package/dist/src/decorators.js.map +1 -1
- package/dist/src/lib.d.ts +77 -77
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +7 -4
- package/dist/src/lib.js.map +1 -1
- package/package.json +23 -21
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DecoratorContext, Model, ModelProperty, Operation } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@example` - attaches example files to an operation. Multiple examples can be specified.
|
|
4
|
+
*
|
|
5
|
+
* `@example` can be specified on Operations.
|
|
6
|
+
*
|
|
7
|
+
* @param pathOrUri path or Uri to the example file.
|
|
8
|
+
* @param title name or description of the example file.
|
|
9
|
+
*/
|
|
10
|
+
export type ExampleDecorator = (context: DecoratorContext, target: Operation, pathOrUri: string, title: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* `@useRef` - is used to replace the TypeSpec model type in emitter output with a pre-existing named OpenAPI schema such as Azure Resource Manager common types.
|
|
13
|
+
*
|
|
14
|
+
* `@useRef` can be specified on Models and ModelProperty.
|
|
15
|
+
*
|
|
16
|
+
* @param jsonRef path or Uri to an OpenAPI schema.
|
|
17
|
+
*/
|
|
18
|
+
export type UseRefDecorator = (context: DecoratorContext, entity: Model | ModelProperty, jsonRef: string) => void;
|
|
19
|
+
//# sourceMappingURL=Autorest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autorest.d.ts","sourceRoot":"","sources":["../../generated-defs/Autorest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE5F;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,KACV,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,EAC7B,OAAO,EAAE,MAAM,KACZ,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autorest.js","sourceRoot":"","sources":["../../generated-defs/Autorest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autorest.ts-test.d.ts","sourceRoot":"","sources":["../../generated-defs/Autorest.ts-test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** An error here would mean that the decorator is not exported or doesn't have the right name. */
|
|
2
|
+
import { $example, $useRef } from "@azure-tools/typespec-autorest";
|
|
3
|
+
/** An error here would mean that the exported decorator is not using the same signature. Make sure to have export const $decName: DecNameDecorator = (...) => ... */
|
|
4
|
+
const _ = {
|
|
5
|
+
$example,
|
|
6
|
+
$useRef,
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=Autorest.ts-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autorest.ts-test.js","sourceRoot":"","sources":["../../generated-defs/Autorest.ts-test.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAQnE,qKAAqK;AACrK,MAAM,CAAC,GAAe;IACpB,QAAQ;IACR,OAAO;CACR,CAAC"}
|
package/dist/src/decorators.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Program, Type } from "@typespec/compiler";
|
|
2
|
+
import { ExampleDecorator, UseRefDecorator } from "../generated-defs/Autorest.js";
|
|
2
3
|
export declare const namespace = "Autorest";
|
|
3
4
|
export interface Example {
|
|
4
5
|
pathOrUri: string;
|
|
@@ -12,7 +13,7 @@ export interface Example {
|
|
|
12
13
|
*
|
|
13
14
|
* `@example` can be specified on Operations.
|
|
14
15
|
*/
|
|
15
|
-
export declare
|
|
16
|
+
export declare const $example: ExampleDecorator;
|
|
16
17
|
export declare function getExamples(program: Program, entity: Type): Example[] | undefined;
|
|
17
18
|
/**
|
|
18
19
|
* `@useRef` - is used to replace the TypeSpec model type in emitter output with a pre-existing named OpenAPI schema such as ARM common types.
|
|
@@ -21,6 +22,6 @@ export declare function getExamples(program: Program, entity: Type): Example[] |
|
|
|
21
22
|
*
|
|
22
23
|
* `@useRef` can be specified on Models and ModelProperty.
|
|
23
24
|
*/
|
|
24
|
-
export declare
|
|
25
|
+
export declare const $useRef: UseRefDecorator;
|
|
25
26
|
export declare function getRef(program: Program, entity: Type): string | undefined;
|
|
26
27
|
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGlF,eAAO,MAAM,SAAS,aAAa,CAAC;AAEpC,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,EAAE,gBAwBtB,CAAC;AAEF,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE,GAAG,SAAS,CAEjF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,eAMrB,CAAC;AAEF,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAGzE"}
|
package/dist/src/decorators.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutorestStateKeys, reportDiagnostic } from "./lib.js";
|
|
2
2
|
export const namespace = "Autorest";
|
|
3
|
-
const exampleKey = createStateSymbol("example");
|
|
4
3
|
/**
|
|
5
4
|
* `@example` - attaches example files to an operation. Multiple examples can be specified.
|
|
6
5
|
*
|
|
@@ -9,13 +8,13 @@ const exampleKey = createStateSymbol("example");
|
|
|
9
8
|
*
|
|
10
9
|
* `@example` can be specified on Operations.
|
|
11
10
|
*/
|
|
12
|
-
export
|
|
11
|
+
export const $example = (context, entity, pathOrUri, title) => {
|
|
13
12
|
const { program } = context;
|
|
14
|
-
if (!program.stateMap(
|
|
15
|
-
program.stateMap(
|
|
13
|
+
if (!program.stateMap(AutorestStateKeys.example).has(entity)) {
|
|
14
|
+
program.stateMap(AutorestStateKeys.example).set(entity, []);
|
|
16
15
|
}
|
|
17
16
|
else if (program
|
|
18
|
-
.stateMap(
|
|
17
|
+
.stateMap(AutorestStateKeys.example)
|
|
19
18
|
.get(entity)
|
|
20
19
|
.find((e) => e.title === title || e.pathOrUri === pathOrUri)) {
|
|
21
20
|
reportDiagnostic(program, {
|
|
@@ -23,15 +22,14 @@ export function $example(context, entity, pathOrUri, title) {
|
|
|
23
22
|
target: entity,
|
|
24
23
|
});
|
|
25
24
|
}
|
|
26
|
-
program.stateMap(
|
|
25
|
+
program.stateMap(AutorestStateKeys.example).get(entity).push({
|
|
27
26
|
pathOrUri,
|
|
28
27
|
title,
|
|
29
28
|
});
|
|
30
|
-
}
|
|
29
|
+
};
|
|
31
30
|
export function getExamples(program, entity) {
|
|
32
|
-
return program.stateMap(
|
|
31
|
+
return program.stateMap(AutorestStateKeys.example).get(entity);
|
|
33
32
|
}
|
|
34
|
-
const refTargetsKey = createStateSymbol("autorest.ref");
|
|
35
33
|
/**
|
|
36
34
|
* `@useRef` - is used to replace the TypeSpec model type in emitter output with a pre-existing named OpenAPI schema such as ARM common types.
|
|
37
35
|
*
|
|
@@ -39,11 +37,11 @@ const refTargetsKey = createStateSymbol("autorest.ref");
|
|
|
39
37
|
*
|
|
40
38
|
* `@useRef` can be specified on Models and ModelProperty.
|
|
41
39
|
*/
|
|
42
|
-
export
|
|
43
|
-
context.program.stateMap(
|
|
44
|
-
}
|
|
40
|
+
export const $useRef = (context, entity, jsonRef) => {
|
|
41
|
+
context.program.stateMap(AutorestStateKeys.useRef).set(entity, jsonRef);
|
|
42
|
+
};
|
|
45
43
|
export function getRef(program, entity) {
|
|
46
|
-
const refOrProducer = program.stateMap(
|
|
44
|
+
const refOrProducer = program.stateMap(AutorestStateKeys.useRef).get(entity);
|
|
47
45
|
return refOrProducer;
|
|
48
46
|
}
|
|
49
47
|
//# sourceMappingURL=decorators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAA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C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1E,CAAC,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,OAAgB,EAAE,MAAY;IACnD,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7E,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
package/dist/src/lib.d.ts
CHANGED
|
@@ -95,16 +95,16 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
|
|
|
95
95
|
readonly default: "Request has multiple body types";
|
|
96
96
|
};
|
|
97
97
|
"duplicate-header": {
|
|
98
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
98
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
99
99
|
};
|
|
100
100
|
"duplicate-example": {
|
|
101
101
|
readonly default: "Duplicate @example declarations on operation";
|
|
102
102
|
};
|
|
103
103
|
"duplicate-example-file": {
|
|
104
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
104
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
105
105
|
};
|
|
106
106
|
"invalid-schema": {
|
|
107
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
107
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
108
108
|
};
|
|
109
109
|
"union-null": {
|
|
110
110
|
readonly default: "Cannot have a union containing only null types.";
|
|
@@ -114,56 +114,56 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
|
|
|
114
114
|
readonly empty: "Empty unions are not supported for OpenAPI v2 - enums must have at least one value.";
|
|
115
115
|
};
|
|
116
116
|
"invalid-default": {
|
|
117
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
117
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
118
118
|
};
|
|
119
119
|
"invalid-multi-collection-format": {
|
|
120
120
|
readonly default: "The 'multi' should be applied to parameter in 'query', 'header' or 'formData'.";
|
|
121
121
|
};
|
|
122
122
|
"inline-cycle": {
|
|
123
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
123
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
124
124
|
};
|
|
125
125
|
"nonspecific-scalar": {
|
|
126
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
126
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
127
127
|
};
|
|
128
128
|
"example-loading": {
|
|
129
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
130
|
-
readonly noDirectory: import("@typespec/compiler").CallableMessage<[
|
|
131
|
-
readonly noOperationId: import("@typespec/compiler").CallableMessage<[
|
|
129
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
130
|
+
readonly noDirectory: import("@typespec/compiler").CallableMessage<[string]>;
|
|
131
|
+
readonly noOperationId: import("@typespec/compiler").CallableMessage<[string]>;
|
|
132
132
|
};
|
|
133
133
|
"unsupported-http-auth-scheme": {
|
|
134
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
134
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
135
135
|
};
|
|
136
136
|
"unsupported-status-code-range": {
|
|
137
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
137
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
138
138
|
};
|
|
139
139
|
"unsupported-multipart-type": {
|
|
140
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
140
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
141
141
|
};
|
|
142
142
|
"unsupported-param-type": {
|
|
143
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
143
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
144
144
|
};
|
|
145
145
|
"invalid-format": {
|
|
146
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
146
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
147
147
|
};
|
|
148
148
|
"unsupported-auth": {
|
|
149
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
149
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
150
150
|
};
|
|
151
|
-
}, AutorestEmitterOptions,
|
|
151
|
+
}, AutorestEmitterOptions, "example" | "useRef">;
|
|
152
152
|
export declare const reportDiagnostic: <C extends "duplicate-body-types" | "duplicate-header" | "duplicate-example" | "duplicate-example-file" | "invalid-schema" | "union-null" | "union-unsupported" | "invalid-default" | "invalid-multi-collection-format" | "inline-cycle" | "nonspecific-scalar" | "example-loading" | "unsupported-http-auth-scheme" | "unsupported-status-code-range" | "unsupported-multipart-type" | "unsupported-param-type" | "invalid-format" | "unsupported-auth", M extends keyof {
|
|
153
153
|
"duplicate-body-types": {
|
|
154
154
|
readonly default: "Request has multiple body types";
|
|
155
155
|
};
|
|
156
156
|
"duplicate-header": {
|
|
157
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
157
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
158
158
|
};
|
|
159
159
|
"duplicate-example": {
|
|
160
160
|
readonly default: "Duplicate @example declarations on operation";
|
|
161
161
|
};
|
|
162
162
|
"duplicate-example-file": {
|
|
163
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
163
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
164
164
|
};
|
|
165
165
|
"invalid-schema": {
|
|
166
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
166
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
167
167
|
};
|
|
168
168
|
"union-null": {
|
|
169
169
|
readonly default: "Cannot have a union containing only null types.";
|
|
@@ -173,55 +173,55 @@ export declare const reportDiagnostic: <C extends "duplicate-body-types" | "dupl
|
|
|
173
173
|
readonly empty: "Empty unions are not supported for OpenAPI v2 - enums must have at least one value.";
|
|
174
174
|
};
|
|
175
175
|
"invalid-default": {
|
|
176
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
176
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
177
177
|
};
|
|
178
178
|
"invalid-multi-collection-format": {
|
|
179
179
|
readonly default: "The 'multi' should be applied to parameter in 'query', 'header' or 'formData'.";
|
|
180
180
|
};
|
|
181
181
|
"inline-cycle": {
|
|
182
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
182
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
183
183
|
};
|
|
184
184
|
"nonspecific-scalar": {
|
|
185
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
185
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
186
186
|
};
|
|
187
187
|
"example-loading": {
|
|
188
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
189
|
-
readonly noDirectory: import("@typespec/compiler").CallableMessage<[
|
|
190
|
-
readonly noOperationId: import("@typespec/compiler").CallableMessage<[
|
|
188
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
189
|
+
readonly noDirectory: import("@typespec/compiler").CallableMessage<[string]>;
|
|
190
|
+
readonly noOperationId: import("@typespec/compiler").CallableMessage<[string]>;
|
|
191
191
|
};
|
|
192
192
|
"unsupported-http-auth-scheme": {
|
|
193
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
193
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
194
194
|
};
|
|
195
195
|
"unsupported-status-code-range": {
|
|
196
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
196
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
197
197
|
};
|
|
198
198
|
"unsupported-multipart-type": {
|
|
199
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
199
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
200
200
|
};
|
|
201
201
|
"unsupported-param-type": {
|
|
202
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
202
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
203
203
|
};
|
|
204
204
|
"invalid-format": {
|
|
205
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
205
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
206
206
|
};
|
|
207
207
|
"unsupported-auth": {
|
|
208
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
208
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
209
209
|
};
|
|
210
210
|
}[C]>(program: import("@typespec/compiler").Program, diag: import("@typespec/compiler").DiagnosticReport<{
|
|
211
211
|
"duplicate-body-types": {
|
|
212
212
|
readonly default: "Request has multiple body types";
|
|
213
213
|
};
|
|
214
214
|
"duplicate-header": {
|
|
215
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
215
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
216
216
|
};
|
|
217
217
|
"duplicate-example": {
|
|
218
218
|
readonly default: "Duplicate @example declarations on operation";
|
|
219
219
|
};
|
|
220
220
|
"duplicate-example-file": {
|
|
221
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
221
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
222
222
|
};
|
|
223
223
|
"invalid-schema": {
|
|
224
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
224
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
225
225
|
};
|
|
226
226
|
"union-null": {
|
|
227
227
|
readonly default: "Cannot have a union containing only null types.";
|
|
@@ -231,55 +231,55 @@ export declare const reportDiagnostic: <C extends "duplicate-body-types" | "dupl
|
|
|
231
231
|
readonly empty: "Empty unions are not supported for OpenAPI v2 - enums must have at least one value.";
|
|
232
232
|
};
|
|
233
233
|
"invalid-default": {
|
|
234
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
234
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
235
235
|
};
|
|
236
236
|
"invalid-multi-collection-format": {
|
|
237
237
|
readonly default: "The 'multi' should be applied to parameter in 'query', 'header' or 'formData'.";
|
|
238
238
|
};
|
|
239
239
|
"inline-cycle": {
|
|
240
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
240
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
241
241
|
};
|
|
242
242
|
"nonspecific-scalar": {
|
|
243
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
243
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
244
244
|
};
|
|
245
245
|
"example-loading": {
|
|
246
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
247
|
-
readonly noDirectory: import("@typespec/compiler").CallableMessage<[
|
|
248
|
-
readonly noOperationId: import("@typespec/compiler").CallableMessage<[
|
|
246
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
247
|
+
readonly noDirectory: import("@typespec/compiler").CallableMessage<[string]>;
|
|
248
|
+
readonly noOperationId: import("@typespec/compiler").CallableMessage<[string]>;
|
|
249
249
|
};
|
|
250
250
|
"unsupported-http-auth-scheme": {
|
|
251
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
251
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
252
252
|
};
|
|
253
253
|
"unsupported-status-code-range": {
|
|
254
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
254
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
255
255
|
};
|
|
256
256
|
"unsupported-multipart-type": {
|
|
257
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
257
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
258
258
|
};
|
|
259
259
|
"unsupported-param-type": {
|
|
260
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
260
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
261
261
|
};
|
|
262
262
|
"invalid-format": {
|
|
263
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
263
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
264
264
|
};
|
|
265
265
|
"unsupported-auth": {
|
|
266
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
266
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
267
267
|
};
|
|
268
268
|
}, C, M>) => void, createDiagnostic: <C extends "duplicate-body-types" | "duplicate-header" | "duplicate-example" | "duplicate-example-file" | "invalid-schema" | "union-null" | "union-unsupported" | "invalid-default" | "invalid-multi-collection-format" | "inline-cycle" | "nonspecific-scalar" | "example-loading" | "unsupported-http-auth-scheme" | "unsupported-status-code-range" | "unsupported-multipart-type" | "unsupported-param-type" | "invalid-format" | "unsupported-auth", M extends keyof {
|
|
269
269
|
"duplicate-body-types": {
|
|
270
270
|
readonly default: "Request has multiple body types";
|
|
271
271
|
};
|
|
272
272
|
"duplicate-header": {
|
|
273
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
273
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
274
274
|
};
|
|
275
275
|
"duplicate-example": {
|
|
276
276
|
readonly default: "Duplicate @example declarations on operation";
|
|
277
277
|
};
|
|
278
278
|
"duplicate-example-file": {
|
|
279
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
279
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
280
280
|
};
|
|
281
281
|
"invalid-schema": {
|
|
282
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
282
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
283
283
|
};
|
|
284
284
|
"union-null": {
|
|
285
285
|
readonly default: "Cannot have a union containing only null types.";
|
|
@@ -289,55 +289,55 @@ export declare const reportDiagnostic: <C extends "duplicate-body-types" | "dupl
|
|
|
289
289
|
readonly empty: "Empty unions are not supported for OpenAPI v2 - enums must have at least one value.";
|
|
290
290
|
};
|
|
291
291
|
"invalid-default": {
|
|
292
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
292
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
293
293
|
};
|
|
294
294
|
"invalid-multi-collection-format": {
|
|
295
295
|
readonly default: "The 'multi' should be applied to parameter in 'query', 'header' or 'formData'.";
|
|
296
296
|
};
|
|
297
297
|
"inline-cycle": {
|
|
298
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
298
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
299
299
|
};
|
|
300
300
|
"nonspecific-scalar": {
|
|
301
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
301
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
302
302
|
};
|
|
303
303
|
"example-loading": {
|
|
304
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
305
|
-
readonly noDirectory: import("@typespec/compiler").CallableMessage<[
|
|
306
|
-
readonly noOperationId: import("@typespec/compiler").CallableMessage<[
|
|
304
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
305
|
+
readonly noDirectory: import("@typespec/compiler").CallableMessage<[string]>;
|
|
306
|
+
readonly noOperationId: import("@typespec/compiler").CallableMessage<[string]>;
|
|
307
307
|
};
|
|
308
308
|
"unsupported-http-auth-scheme": {
|
|
309
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
309
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
310
310
|
};
|
|
311
311
|
"unsupported-status-code-range": {
|
|
312
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
312
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
313
313
|
};
|
|
314
314
|
"unsupported-multipart-type": {
|
|
315
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
315
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
316
316
|
};
|
|
317
317
|
"unsupported-param-type": {
|
|
318
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
318
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
319
319
|
};
|
|
320
320
|
"invalid-format": {
|
|
321
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
321
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
322
322
|
};
|
|
323
323
|
"unsupported-auth": {
|
|
324
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
324
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
325
325
|
};
|
|
326
326
|
}[C]>(diag: import("@typespec/compiler").DiagnosticReport<{
|
|
327
327
|
"duplicate-body-types": {
|
|
328
328
|
readonly default: "Request has multiple body types";
|
|
329
329
|
};
|
|
330
330
|
"duplicate-header": {
|
|
331
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
331
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
332
332
|
};
|
|
333
333
|
"duplicate-example": {
|
|
334
334
|
readonly default: "Duplicate @example declarations on operation";
|
|
335
335
|
};
|
|
336
336
|
"duplicate-example-file": {
|
|
337
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
337
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
338
338
|
};
|
|
339
339
|
"invalid-schema": {
|
|
340
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
340
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
341
341
|
};
|
|
342
342
|
"union-null": {
|
|
343
343
|
readonly default: "Cannot have a union containing only null types.";
|
|
@@ -347,39 +347,39 @@ export declare const reportDiagnostic: <C extends "duplicate-body-types" | "dupl
|
|
|
347
347
|
readonly empty: "Empty unions are not supported for OpenAPI v2 - enums must have at least one value.";
|
|
348
348
|
};
|
|
349
349
|
"invalid-default": {
|
|
350
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
350
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
351
351
|
};
|
|
352
352
|
"invalid-multi-collection-format": {
|
|
353
353
|
readonly default: "The 'multi' should be applied to parameter in 'query', 'header' or 'formData'.";
|
|
354
354
|
};
|
|
355
355
|
"inline-cycle": {
|
|
356
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
356
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
357
357
|
};
|
|
358
358
|
"nonspecific-scalar": {
|
|
359
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
359
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
360
360
|
};
|
|
361
361
|
"example-loading": {
|
|
362
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
363
|
-
readonly noDirectory: import("@typespec/compiler").CallableMessage<[
|
|
364
|
-
readonly noOperationId: import("@typespec/compiler").CallableMessage<[
|
|
362
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
363
|
+
readonly noDirectory: import("@typespec/compiler").CallableMessage<[string]>;
|
|
364
|
+
readonly noOperationId: import("@typespec/compiler").CallableMessage<[string]>;
|
|
365
365
|
};
|
|
366
366
|
"unsupported-http-auth-scheme": {
|
|
367
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
367
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
368
368
|
};
|
|
369
369
|
"unsupported-status-code-range": {
|
|
370
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
370
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
371
371
|
};
|
|
372
372
|
"unsupported-multipart-type": {
|
|
373
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
373
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
374
374
|
};
|
|
375
375
|
"unsupported-param-type": {
|
|
376
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
376
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
377
377
|
};
|
|
378
378
|
"invalid-format": {
|
|
379
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
379
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
380
380
|
};
|
|
381
381
|
"unsupported-auth": {
|
|
382
|
-
readonly default: import("@typespec/compiler").CallableMessage<[
|
|
382
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
383
383
|
};
|
|
384
|
-
}, C, M>) => import("@typespec/compiler").Diagnostic,
|
|
384
|
+
}, C, M>) => import("@typespec/compiler").Diagnostic, AutorestStateKeys: Record<"example" | "useRef", symbol>, getTracer: (program: import("@typespec/compiler").Program) => import("@typespec/compiler").Tracer;
|
|
385
385
|
//# sourceMappingURL=lib.d.ts.map
|
package/dist/src/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;OAGG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;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,wBAAwB,CAAC;CACjE;AA0HD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDA6HN,CAAC;AAEZ,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAAa,iBAAiB,wCAAE,SAAS,wFAAS,CAAC"}
|
package/dist/src/lib.js
CHANGED
|
@@ -111,7 +111,7 @@ const EmitterOptionsSchema = {
|
|
|
111
111
|
},
|
|
112
112
|
required: [],
|
|
113
113
|
};
|
|
114
|
-
const
|
|
114
|
+
export const $lib = createTypeSpecLibrary({
|
|
115
115
|
name: "@azure-tools/typespec-autorest",
|
|
116
116
|
diagnostics: {
|
|
117
117
|
"duplicate-body-types": {
|
|
@@ -229,7 +229,10 @@ const libDef = {
|
|
|
229
229
|
emitter: {
|
|
230
230
|
options: EmitterOptionsSchema,
|
|
231
231
|
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
state: {
|
|
233
|
+
example: { description: "State for the @example decorator" },
|
|
234
|
+
useRef: { description: "State for the @useRef decorator" },
|
|
235
|
+
},
|
|
236
|
+
});
|
|
237
|
+
export const { reportDiagnostic, createDiagnostic, stateKeys: AutorestStateKeys, getTracer } = $lib;
|
|
235
238
|
//# sourceMappingURL=lib.js.map
|
package/dist/src/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|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;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,mBAAmB,UAAU,8EAA8E;aACjI;SACF;KACF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,oBAA8D;KACxE;IAED,KAAK,EAAE;QACL,OAAO,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE;QAC5D,MAAM,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE;KAC3D;CACO,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-autorest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0-dev.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec library for emitting openapi from the TypeSpec REST protocol binding",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -40,17 +40,27 @@
|
|
|
40
40
|
"!dist/test/**"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@azure-tools/typespec-azure-core": "~0.44.0",
|
|
44
|
-
"@azure-tools/typespec-azure-resource-manager": "~0.44.0",
|
|
45
|
-
"@azure-tools/typespec-client-generator-core": "~0.44.0",
|
|
46
|
-
"@typespec/compiler": "~0.58.0",
|
|
47
|
-
"@typespec/
|
|
48
|
-
"@typespec/
|
|
49
|
-
"@typespec/
|
|
50
|
-
"@typespec/
|
|
43
|
+
"@azure-tools/typespec-azure-core": "~0.44.0 || >=0.45.0-dev <0.45.0",
|
|
44
|
+
"@azure-tools/typespec-azure-resource-manager": "~0.44.0 || >=0.45.0-dev <0.45.0",
|
|
45
|
+
"@azure-tools/typespec-client-generator-core": "~0.44.1 || >=0.45.0-dev <0.45.0",
|
|
46
|
+
"@typespec/compiler": "~0.58.1 || >=0.59.0-dev <0.59.0",
|
|
47
|
+
"@typespec/http": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
48
|
+
"@typespec/openapi": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
49
|
+
"@typespec/rest": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
50
|
+
"@typespec/versioning": "~0.58.0 || >=0.59.0-dev <0.59.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
+
"@azure-tools/typespec-azure-core": "~0.44.0 || >=0.45.0-dev <0.45.0",
|
|
54
|
+
"@azure-tools/typespec-azure-resource-manager": "~0.44.0 || >=0.45.0-dev <0.45.0",
|
|
55
|
+
"@azure-tools/typespec-client-generator-core": "~0.44.1 || >=0.45.0-dev <0.45.0",
|
|
53
56
|
"@types/node": "~18.11.19",
|
|
57
|
+
"@typespec/compiler": "~0.58.1 || >=0.59.0-dev <0.59.0",
|
|
58
|
+
"@typespec/http": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
59
|
+
"@typespec/json-schema": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
60
|
+
"@typespec/library-linter": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
61
|
+
"@typespec/openapi": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
62
|
+
"@typespec/rest": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
63
|
+
"@typespec/versioning": "~0.58.0 || >=0.59.0-dev <0.59.0",
|
|
54
64
|
"@vitest/coverage-v8": "^1.6.0",
|
|
55
65
|
"@vitest/ui": "^1.6.0",
|
|
56
66
|
"c8": "^10.1.2",
|
|
@@ -58,22 +68,14 @@
|
|
|
58
68
|
"rimraf": "~5.0.7",
|
|
59
69
|
"typescript": "~5.5.3",
|
|
60
70
|
"vitest": "^1.6.0",
|
|
61
|
-
"@
|
|
62
|
-
"@azure-tools/typespec-azure-resource-manager": "~0.44.0",
|
|
63
|
-
"@azure-tools/typespec-client-generator-core": "~0.44.0",
|
|
64
|
-
"@typespec/http": "~0.58.0",
|
|
65
|
-
"@typespec/json-schema": "~0.58.0",
|
|
66
|
-
"@typespec/compiler": "~0.58.0",
|
|
67
|
-
"@typespec/library-linter": "~0.58.0",
|
|
68
|
-
"@typespec/openapi": "~0.58.0",
|
|
69
|
-
"@typespec/rest": "~0.58.0",
|
|
70
|
-
"@typespec/tspd": "~0.46.0",
|
|
71
|
-
"@typespec/versioning": "~0.58.0"
|
|
71
|
+
"@typespec/tspd": "~0.46.0"
|
|
72
72
|
},
|
|
73
|
+
"dependencies": {},
|
|
73
74
|
"scripts": {
|
|
74
75
|
"clean": "rimraf ./dist ./temp",
|
|
75
|
-
"build": "npm run regen-autorest-openapi-schema && tsc -p . && npm run lint-typespec-library",
|
|
76
|
+
"build": "npm run gen-extern-signature && npm run regen-autorest-openapi-schema && tsc -p . && npm run lint-typespec-library",
|
|
76
77
|
"watch": "tsc -p . --watch",
|
|
78
|
+
"gen-extern-signature": "tspd --enable-experimental gen-extern-signature .",
|
|
77
79
|
"lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit",
|
|
78
80
|
"regen-autorest-openapi-schema": "tsp compile ./schema/autorest-openapi-schema.tsp --warn-as-error && node ./.scripts/schema-json-to-js.js",
|
|
79
81
|
"test": "vitest run",
|