@typespec/http-specs 0.1.0-alpha.33-dev.6 → 0.1.0-alpha.34
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 +24 -0
- package/package.json +13 -13
- package/specs/special-words/main.tsp +48 -42
- package/manifest.json +0 -11200
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @typespec/http-specs
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.34
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- [#9953](https://github.com/microsoft/typespec/pull/9953) Fix response type of putExtensibleStringValue to include explicit content-type header
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 0.1.0-alpha.33
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- [#9785](https://github.com/microsoft/typespec/pull/9785) Add spector case for extensible enum with special word member names
|
|
15
|
+
- [#9660](https://github.com/microsoft/typespec/pull/9660) Add test case for XML model with datetime properties (rfc3339 and rfc7231 encodings)
|
|
16
|
+
- [#9660](https://github.com/microsoft/typespec/pull/9660) Add test case for XML model with enum property
|
|
17
|
+
|
|
18
|
+
### Bump dependencies
|
|
19
|
+
|
|
20
|
+
- [#9838](https://github.com/microsoft/typespec/pull/9838) Upgrade dependencies
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- [#9945](https://github.com/microsoft/typespec/pull/9945) Fix float comparison in duration encode mockapi for query and header params to use numeric comparison instead of string comparison, allowing values like `35625.0` to match `35625`
|
|
25
|
+
|
|
26
|
+
|
|
3
27
|
## 0.1.0-alpha.32
|
|
4
28
|
|
|
5
29
|
### Features
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/http-specs",
|
|
3
3
|
"displayName": "Http Specs",
|
|
4
|
-
"version": "0.1.0-alpha.
|
|
4
|
+
"version": "0.1.0-alpha.34",
|
|
5
5
|
"description": "Spec scenarios and mock apis",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"type": "module",
|
|
@@ -22,27 +22,27 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/microsoft/typespec#readme",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"
|
|
26
|
-
"@typespec/
|
|
27
|
-
"
|
|
25
|
+
"deep-equal": "^2.2.0",
|
|
26
|
+
"@typespec/spec-api": "^0.1.0-alpha.13",
|
|
27
|
+
"@typespec/spector": "^0.1.0-alpha.24"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/deep-equal": "^1.0.1",
|
|
31
31
|
"@types/multer": "^2.0.0",
|
|
32
32
|
"@types/node": "~25.3.0",
|
|
33
|
-
"@typespec/json-schema": "^1.9.0 || >= 1.10.0-dev.3",
|
|
34
|
-
"@typespec/openapi": "^1.9.0 || >= 1.10.0-dev.4",
|
|
35
|
-
"@typespec/openapi3": "^1.9.0 || >= 1.10.0-dev.8",
|
|
36
33
|
"concurrently": "^9.1.2",
|
|
37
34
|
"rimraf": "~6.1.3",
|
|
38
|
-
"typescript": "~5.9.3"
|
|
35
|
+
"typescript": "~5.9.3",
|
|
36
|
+
"@typespec/json-schema": "^1.10.0",
|
|
37
|
+
"@typespec/openapi": "^1.10.0",
|
|
38
|
+
"@typespec/openapi3": "^1.10.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@typespec/compiler": "^1.
|
|
42
|
-
"@typespec/http": "^1.
|
|
43
|
-
"@typespec/rest": "^0.
|
|
44
|
-
"@typespec/versioning": "^0.
|
|
45
|
-
"@typespec/xml": "^0.
|
|
41
|
+
"@typespec/compiler": "^1.10.0",
|
|
42
|
+
"@typespec/http": "^1.10.0",
|
|
43
|
+
"@typespec/rest": "^0.80.0",
|
|
44
|
+
"@typespec/versioning": "^0.80.0",
|
|
45
|
+
"@typespec/xml": "^0.80.0"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"watch": "tsc -p ./tsconfig.build.json --watch",
|
|
@@ -290,51 +290,51 @@ namespace ModelProperties {
|
|
|
290
290
|
op withList(@body body: ModelWithList): void;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
/**
|
|
294
|
-
* Verify enum member names that are special words using extensible enum (union).
|
|
295
|
-
*/
|
|
296
|
-
union ExtensibleString {
|
|
297
|
-
string,
|
|
298
|
-
and: "and",
|
|
299
|
-
as: "as",
|
|
300
|
-
assert: "assert",
|
|
301
|
-
async: "async",
|
|
302
|
-
await: "await",
|
|
303
|
-
break: "break",
|
|
304
|
-
class: "class",
|
|
305
|
-
constructor: "constructor",
|
|
306
|
-
continue: "continue",
|
|
307
|
-
def: "def",
|
|
308
|
-
del: "del",
|
|
309
|
-
elif: "elif",
|
|
310
|
-
`else`: "else",
|
|
311
|
-
except: "except",
|
|
312
|
-
exec: "exec",
|
|
313
|
-
finally: "finally",
|
|
314
|
-
for: "for",
|
|
315
|
-
from: "from",
|
|
316
|
-
global: "global",
|
|
317
|
-
`if`: "if",
|
|
318
|
-
`import`: "import",
|
|
319
|
-
in: "in",
|
|
320
|
-
`is`: "is",
|
|
321
|
-
lambda: "lambda",
|
|
322
|
-
not: "not",
|
|
323
|
-
or: "or",
|
|
324
|
-
pass: "pass",
|
|
325
|
-
raise: "raise",
|
|
326
|
-
`return`: "return",
|
|
327
|
-
try: "try",
|
|
328
|
-
while: "while",
|
|
329
|
-
with: "with",
|
|
330
|
-
yield: "yield",
|
|
331
|
-
}
|
|
332
|
-
|
|
333
293
|
/**
|
|
334
294
|
* Verify enum member names that are special words.
|
|
335
295
|
*/
|
|
336
296
|
@route("/extensible-strings")
|
|
337
|
-
|
|
297
|
+
namespace ExtensibleStrings {
|
|
298
|
+
/**
|
|
299
|
+
* Verify enum member names that are special words using extensible enum (union).
|
|
300
|
+
*/
|
|
301
|
+
union ExtensibleString {
|
|
302
|
+
string,
|
|
303
|
+
and: "and",
|
|
304
|
+
as: "as",
|
|
305
|
+
assert: "assert",
|
|
306
|
+
async: "async",
|
|
307
|
+
await: "await",
|
|
308
|
+
break: "break",
|
|
309
|
+
class: "class",
|
|
310
|
+
constructor: "constructor",
|
|
311
|
+
continue: "continue",
|
|
312
|
+
def: "def",
|
|
313
|
+
del: "del",
|
|
314
|
+
elif: "elif",
|
|
315
|
+
`else`: "else",
|
|
316
|
+
except: "except",
|
|
317
|
+
exec: "exec",
|
|
318
|
+
finally: "finally",
|
|
319
|
+
for: "for",
|
|
320
|
+
from: "from",
|
|
321
|
+
global: "global",
|
|
322
|
+
`if`: "if",
|
|
323
|
+
`import`: "import",
|
|
324
|
+
in: "in",
|
|
325
|
+
`is`: "is",
|
|
326
|
+
lambda: "lambda",
|
|
327
|
+
not: "not",
|
|
328
|
+
or: "or",
|
|
329
|
+
pass: "pass",
|
|
330
|
+
raise: "raise",
|
|
331
|
+
`return`: "return",
|
|
332
|
+
try: "try",
|
|
333
|
+
while: "while",
|
|
334
|
+
with: "with",
|
|
335
|
+
yield: "yield",
|
|
336
|
+
}
|
|
337
|
+
|
|
338
338
|
@scenario
|
|
339
339
|
@scenarioDoc("""
|
|
340
340
|
Verify that enum members with special word names can be sent and received properly.
|
|
@@ -342,5 +342,11 @@ interface ExtensibleStrings {
|
|
|
342
342
|
""")
|
|
343
343
|
@put
|
|
344
344
|
@route("/string")
|
|
345
|
-
putExtensibleStringValue(
|
|
345
|
+
op putExtensibleStringValue(
|
|
346
|
+
@header contentType: "application/json",
|
|
347
|
+
@body body: ExtensibleString,
|
|
348
|
+
): {
|
|
349
|
+
@header contentType: "application/json";
|
|
350
|
+
@body body: ExtensibleString;
|
|
351
|
+
};
|
|
346
352
|
}
|