@typespec/http 0.59.0-dev.1 → 0.59.0-dev.10
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 +47 -28
- package/dist/generated-defs/TypeSpec.Http.d.ts +41 -16
- package/dist/generated-defs/TypeSpec.Http.d.ts.map +1 -1
- package/dist/src/decorators.d.ts.map +1 -1
- package/dist/src/decorators.js +19 -29
- package/dist/src/decorators.js.map +1 -1
- package/dist/src/http-property.d.ts +4 -6
- package/dist/src/http-property.d.ts.map +1 -1
- package/dist/src/http-property.js +78 -41
- package/dist/src/http-property.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +97 -82
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +13 -7
- package/dist/src/lib.js.map +1 -1
- package/dist/src/operations.js +2 -1
- package/dist/src/operations.js.map +1 -1
- package/dist/src/parameters.d.ts +1 -1
- package/dist/src/parameters.d.ts.map +1 -1
- package/dist/src/parameters.js +47 -10
- package/dist/src/parameters.js.map +1 -1
- package/dist/src/payload.js +2 -2
- package/dist/src/payload.js.map +1 -1
- package/dist/src/responses.js +2 -1
- package/dist/src/responses.js.map +1 -1
- package/dist/src/route.d.ts +2 -1
- package/dist/src/route.d.ts.map +1 -1
- package/dist/src/route.js +74 -31
- package/dist/src/route.js.map +1 -1
- package/dist/src/rules/op-reference-container-route.d.ts +1 -1
- package/dist/src/types.d.ts +28 -11
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/uri-template.d.ts +22 -0
- package/dist/src/uri-template.d.ts.map +1 -0
- package/dist/src/uri-template.js +41 -0
- package/dist/src/uri-template.js.map +1 -0
- package/lib/decorators.tsp +74 -16
- package/package.json +6 -6
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { compilerAssert, createDiagnosticCollector, walkPropertiesInherited, } from "@typespec/compiler";
|
|
2
|
-
import { Queue } from "@typespec/compiler/utils";
|
|
3
2
|
import { getHeaderFieldOptions, getPathParamOptions, getQueryParamOptions, isBody, isBodyRoot, isMultipartBodyProperty, isStatusCode, } from "./decorators.js";
|
|
4
3
|
import { createDiagnostic } from "./lib.js";
|
|
5
4
|
import { Visibility, isVisible } from "./metadata.js";
|
|
6
5
|
/**
|
|
7
6
|
* Find the type of a property in a model
|
|
8
7
|
*/
|
|
9
|
-
|
|
8
|
+
function getHttpProperty(program, property, path, options = {}) {
|
|
10
9
|
const diagnostics = [];
|
|
11
10
|
function createResult(opts) {
|
|
12
|
-
return [{ ...opts, property }, diagnostics];
|
|
11
|
+
return [{ ...opts, property, path }, diagnostics];
|
|
13
12
|
}
|
|
14
13
|
const annotations = {
|
|
15
14
|
header: getHeaderFieldOptions(program, property),
|
|
@@ -21,18 +20,53 @@ export function getHttpProperty(program, property, options = {}) {
|
|
|
21
20
|
statusCode: isStatusCode(program, property),
|
|
22
21
|
};
|
|
23
22
|
const defined = Object.entries(annotations).filter((x) => !!x[1]);
|
|
23
|
+
const implicit = options.implicitParameter?.(property);
|
|
24
|
+
if (implicit && defined.length > 0) {
|
|
25
|
+
if (implicit.type === "path" && annotations.path) {
|
|
26
|
+
if (annotations.path.explode ||
|
|
27
|
+
annotations.path.style !== "simple" ||
|
|
28
|
+
annotations.path.allowReserved) {
|
|
29
|
+
diagnostics.push(createDiagnostic({
|
|
30
|
+
code: "use-uri-template",
|
|
31
|
+
format: {
|
|
32
|
+
param: property.name,
|
|
33
|
+
},
|
|
34
|
+
target: property,
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else if (implicit.type === "query" && annotations.query) {
|
|
39
|
+
if (annotations.query.explode) {
|
|
40
|
+
diagnostics.push(createDiagnostic({
|
|
41
|
+
code: "use-uri-template",
|
|
42
|
+
format: {
|
|
43
|
+
param: property.name,
|
|
44
|
+
},
|
|
45
|
+
target: property,
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
diagnostics.push(createDiagnostic({
|
|
51
|
+
code: "incompatible-uri-param",
|
|
52
|
+
format: {
|
|
53
|
+
param: property.name,
|
|
54
|
+
uriKind: implicit.type,
|
|
55
|
+
annotationKind: defined[0][0],
|
|
56
|
+
},
|
|
57
|
+
target: property,
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
24
61
|
if (defined.length === 0) {
|
|
25
|
-
if (
|
|
62
|
+
if (implicit) {
|
|
26
63
|
return createResult({
|
|
27
|
-
kind:
|
|
28
|
-
options:
|
|
29
|
-
name: property.name,
|
|
30
|
-
type: "path",
|
|
31
|
-
},
|
|
64
|
+
kind: implicit.type,
|
|
65
|
+
options: implicit,
|
|
32
66
|
property,
|
|
33
67
|
});
|
|
34
68
|
}
|
|
35
|
-
return
|
|
69
|
+
return createResult({ kind: "bodyProperty" });
|
|
36
70
|
}
|
|
37
71
|
else if (defined.length > 1) {
|
|
38
72
|
diagnostics.push(createDiagnostic({
|
|
@@ -43,31 +77,31 @@ export function getHttpProperty(program, property, options = {}) {
|
|
|
43
77
|
}
|
|
44
78
|
if (annotations.header) {
|
|
45
79
|
if (annotations.header.name.toLowerCase() === "content-type") {
|
|
46
|
-
return createResult({ kind: "contentType"
|
|
80
|
+
return createResult({ kind: "contentType" });
|
|
47
81
|
}
|
|
48
82
|
else {
|
|
49
|
-
return createResult({ kind: "header", options: annotations.header
|
|
83
|
+
return createResult({ kind: "header", options: annotations.header });
|
|
50
84
|
}
|
|
51
85
|
}
|
|
52
86
|
else if (annotations.query) {
|
|
53
|
-
return createResult({ kind: "query", options: annotations.query
|
|
87
|
+
return createResult({ kind: "query", options: annotations.query });
|
|
54
88
|
}
|
|
55
89
|
else if (annotations.path) {
|
|
56
|
-
return createResult({ kind: "path", options: annotations.path
|
|
90
|
+
return createResult({ kind: "path", options: annotations.path });
|
|
57
91
|
}
|
|
58
92
|
else if (annotations.statusCode) {
|
|
59
|
-
return createResult({ kind: "statusCode"
|
|
93
|
+
return createResult({ kind: "statusCode" });
|
|
60
94
|
}
|
|
61
95
|
else if (annotations.body) {
|
|
62
|
-
return createResult({ kind: "body"
|
|
96
|
+
return createResult({ kind: "body" });
|
|
63
97
|
}
|
|
64
98
|
else if (annotations.bodyRoot) {
|
|
65
|
-
return createResult({ kind: "bodyRoot"
|
|
99
|
+
return createResult({ kind: "bodyRoot" });
|
|
66
100
|
}
|
|
67
101
|
else if (annotations.multipartBody) {
|
|
68
|
-
return createResult({ kind: "multipartBody"
|
|
102
|
+
return createResult({ kind: "multipartBody" });
|
|
69
103
|
}
|
|
70
|
-
compilerAssert(false, `Unexpected http property type
|
|
104
|
+
compilerAssert(false, `Unexpected http property type`);
|
|
71
105
|
}
|
|
72
106
|
/**
|
|
73
107
|
* Walks the given input(request parameters or response) and return all the properties and where they should be included(header, query, path, body, as a body property, etc.)
|
|
@@ -81,42 +115,45 @@ export function resolvePayloadProperties(program, type, visibility, options = {}
|
|
|
81
115
|
return diagnostics.wrap([]);
|
|
82
116
|
}
|
|
83
117
|
const visited = new Set();
|
|
84
|
-
|
|
85
|
-
while (!queue.isEmpty()) {
|
|
86
|
-
const [model, rootOpt] = queue.dequeue();
|
|
118
|
+
function checkModel(model, path) {
|
|
87
119
|
visited.add(model);
|
|
120
|
+
let foundBody = false;
|
|
121
|
+
let foundBodyProperty = false;
|
|
88
122
|
for (const property of walkPropertiesInherited(model)) {
|
|
89
|
-
const
|
|
123
|
+
const propPath = [...path, property.name];
|
|
90
124
|
if (!isVisible(program, property, visibility)) {
|
|
91
125
|
continue;
|
|
92
126
|
}
|
|
93
|
-
let httpProperty = diagnostics.pipe(getHttpProperty(program, property, options));
|
|
127
|
+
let httpProperty = diagnostics.pipe(getHttpProperty(program, property, propPath, options));
|
|
94
128
|
if (shouldTreatAsBodyProperty(httpProperty, visibility)) {
|
|
95
|
-
httpProperty = { kind: "bodyProperty", property };
|
|
96
|
-
}
|
|
97
|
-
httpProperties.set(property, httpProperty);
|
|
98
|
-
if (property !== root &&
|
|
99
|
-
(httpProperty.kind === "body" ||
|
|
100
|
-
httpProperty.kind === "bodyRoot" ||
|
|
101
|
-
httpProperty.kind === "multipartBody")) {
|
|
102
|
-
const parent = httpProperties.get(root);
|
|
103
|
-
if (parent?.kind === "bodyProperty") {
|
|
104
|
-
httpProperties.delete(root);
|
|
105
|
-
}
|
|
129
|
+
httpProperty = { kind: "bodyProperty", property, path: propPath };
|
|
106
130
|
}
|
|
107
|
-
if (httpProperty.kind === "body" ||
|
|
108
|
-
|
|
131
|
+
if (httpProperty.kind === "body" ||
|
|
132
|
+
httpProperty.kind === "bodyRoot" ||
|
|
133
|
+
httpProperty.kind === "multipartBody") {
|
|
134
|
+
foundBody = true;
|
|
109
135
|
}
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
type.properties.size > 0 &&
|
|
136
|
+
if (!(httpProperty.kind === "body" || httpProperty.kind === "multipartBody") &&
|
|
137
|
+
isModelWithProperties(property.type) &&
|
|
113
138
|
!visited.has(property.type)) {
|
|
114
|
-
|
|
139
|
+
if (checkModel(property.type, propPath)) {
|
|
140
|
+
foundBody = true;
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (httpProperty.kind === "bodyProperty") {
|
|
145
|
+
foundBodyProperty = true;
|
|
115
146
|
}
|
|
147
|
+
httpProperties.set(property, httpProperty);
|
|
116
148
|
}
|
|
149
|
+
return foundBody && !foundBodyProperty;
|
|
117
150
|
}
|
|
151
|
+
checkModel(type, []);
|
|
118
152
|
return diagnostics.wrap([...httpProperties.values()]);
|
|
119
153
|
}
|
|
154
|
+
function isModelWithProperties(type) {
|
|
155
|
+
return type.kind === "Model" && !type.indexer && type.properties.size > 0;
|
|
156
|
+
}
|
|
120
157
|
function shouldTreatAsBodyProperty(property, visibility) {
|
|
121
158
|
if (visibility & Visibility.Read) {
|
|
122
159
|
return property.kind === "query" || property.kind === "path";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-property.js","sourceRoot":"","sources":["../../src/http-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EACd,yBAAyB,EACzB,uBAAuB,GAIxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"http-property.js","sourceRoot":"","sources":["../../src/http-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EACd,yBAAyB,EACzB,uBAAuB,GAIxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,MAAM,EACN,UAAU,EACV,uBAAuB,EACvB,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA2DtD;;GAEG;AACH,SAAS,eAAe,CACtB,OAAgB,EAChB,QAAuB,EACvB,IAAyB,EACzB,UAAkC,EAAE;IAEpC,MAAM,WAAW,GAAiB,EAAE,CAAC;IACrC,SAAS,YAAY,CACnB,IAAO;QAEP,OAAO,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAS,EAAE,WAAW,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,WAAW,GAAG;QAClB,MAAM,EAAE,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC;QAChD,KAAK,EAAE,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC9C,IAAI,EAAE,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC5C,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC/B,QAAQ,EAAE,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC;QACvC,aAAa,EAAE,uBAAuB,CAAC,OAAO,EAAE,QAAQ,CAAC;QACzD,U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IAAI,CAAC;oBACjB,SAAS;gBACX,CAAC;YACH,CAAC;YACD,IAAI,YAAY,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;gBACzC,iBAAiB,GAAG,IAAI,CAAC;YAC3B,CAAC;YACD,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,SAAS,IAAI,CAAC,iBAAiB,CAAC;IACzC,CAAC;IAED,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAErB,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAU;IACvC,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC;AAC5E,CAAC;AAED,SAAS,yBAAyB,CAAC,QAAsB,EAAE,UAAsB;IAC/E,IAAI,UAAU,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC,IAAI,KAAK,OAAO,IAAI,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC;IAC/D,CAAC;IAED,IAAI,CAAC,CAAC,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,OAAO,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAC;IACxC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,9 +4,10 @@ export { HttpPartOptions } from "../generated-defs/TypeSpec.Http.Private.js";
|
|
|
4
4
|
export * from "./auth.js";
|
|
5
5
|
export * from "./content-types.js";
|
|
6
6
|
export * from "./decorators.js";
|
|
7
|
+
export type { HttpProperty } from "./http-property.js";
|
|
7
8
|
export * from "./metadata.js";
|
|
8
9
|
export * from "./operations.js";
|
|
9
|
-
export
|
|
10
|
+
export { getOperationParameters } from "./parameters.js";
|
|
10
11
|
export { HttpPart, getHttpFileModel, getHttpPart, isHttpFile, isOrExtendsHttpFile, } from "./private.decorators.js";
|
|
11
12
|
export * from "./responses.js";
|
|
12
13
|
export * from "./route.js";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export * from "./content-types.js";
|
|
|
5
5
|
export * from "./decorators.js";
|
|
6
6
|
export * from "./metadata.js";
|
|
7
7
|
export * from "./operations.js";
|
|
8
|
-
export
|
|
8
|
+
export { getOperationParameters } from "./parameters.js";
|
|
9
9
|
export { getHttpFileModel, getHttpPart, isHttpFile, isOrExtendsHttpFile, } from "./private.decorators.js";
|
|
10
10
|
export * from "./responses.js";
|
|
11
11
|
export * from "./route.js";
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAEL,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|