@ancplua/qyl-api-schema 10.0.0 → 10.0.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/README.md
CHANGED
|
@@ -88,39 +88,9 @@ contract instead of discovering the mismatch one malformed field at a time. Read
|
|
|
88
88
|
current value from a running collector or the generated artifacts; it is derived, never
|
|
89
89
|
hand-maintained.
|
|
90
90
|
|
|
91
|
-
##
|
|
91
|
+
## Contributing
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
Node.js releases from 22 onward.
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
npm ci
|
|
98
|
-
npm run lint
|
|
99
|
-
npm run lint:public
|
|
100
|
-
npm run compile
|
|
101
|
-
./build.sh Check
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Important generated outputs include:
|
|
105
|
-
|
|
106
|
-
- `generated/openapi/qyl.openapi.json`
|
|
107
|
-
- `generated/json-schema/qyl-api-schema.json`
|
|
108
|
-
- `generated/contracts/**/*.cs`
|
|
109
|
-
- `generated/ts-types/**`
|
|
110
|
-
|
|
111
|
-
Generated files are not editing surfaces. OpenAPI comes from the official TypeSpec
|
|
112
|
-
emitter; the bundled JSON Schema is a deterministic projection of its component
|
|
113
|
-
schemas and exposes inline route bodies as stable
|
|
114
|
-
`Operations.<operationId>.Request` and
|
|
115
|
-
`Operations.<operationId>.Response.<status>` definitions. Both artifacts preserve
|
|
116
|
-
the same wire names. Change TypeSpec or the owning generator and regenerate.
|
|
117
|
-
|
|
118
|
-
## Publish
|
|
119
|
-
|
|
120
|
-
GitHub Actions publishes both registries through OIDC trusted publishing. A release
|
|
121
|
-
tag supplies one version for npm and NuGet. The workflow validates and packs first,
|
|
122
|
-
publishes in an ordered restartable sequence, waits for indexed artifacts, and then
|
|
123
|
-
smokes clean consumers. No long-lived npm or NuGet token is stored.
|
|
93
|
+
How to build, lint, regenerate and publish is in [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
124
94
|
|
|
125
95
|
## License
|
|
126
96
|
|
package/common/types.tsp
CHANGED
|
@@ -20,8 +20,6 @@ namespace Qyl.Api.Contracts.Common;
|
|
|
20
20
|
@minLength(32)
|
|
21
21
|
@maxLength(32)
|
|
22
22
|
@example("0af7651916cd43dd8448eb211c80319c")
|
|
23
|
-
@TypeSpec.OpenAPI.extension("x-csharp-struct", true)
|
|
24
|
-
@TypeSpec.OpenAPI.extension("x-csharp-type", "TraceId")
|
|
25
23
|
scalar TraceId extends string;
|
|
26
24
|
|
|
27
25
|
@doc("Unique span identifier (16 lowercase hex characters)")
|
|
@@ -29,8 +27,6 @@ scalar TraceId extends string;
|
|
|
29
27
|
@minLength(16)
|
|
30
28
|
@maxLength(16)
|
|
31
29
|
@example("b7ad6b7169203331")
|
|
32
|
-
@TypeSpec.OpenAPI.extension("x-csharp-struct", true)
|
|
33
|
-
@TypeSpec.OpenAPI.extension("x-csharp-type", "SpanId")
|
|
34
30
|
scalar SpanId extends string;
|
|
35
31
|
|
|
36
32
|
@doc("W3C Trace Context traceparent header format")
|
|
@@ -45,8 +41,6 @@ scalar TraceState extends string;
|
|
|
45
41
|
@doc("Unique session identifier")
|
|
46
42
|
@minLength(1)
|
|
47
43
|
@maxLength(128)
|
|
48
|
-
@TypeSpec.OpenAPI.extension("x-csharp-struct", true)
|
|
49
|
-
@TypeSpec.OpenAPI.extension("x-csharp-type", "SessionId")
|
|
50
44
|
scalar SessionId extends string;
|
|
51
45
|
|
|
52
46
|
@doc("User identifier (pseudonymized for privacy)")
|
|
@@ -911,9 +911,7 @@
|
|
|
911
911
|
"type": "string",
|
|
912
912
|
"minLength": 1,
|
|
913
913
|
"maxLength": 128,
|
|
914
|
-
"description": "Unique session identifier"
|
|
915
|
-
"x-csharp-type": "SessionId",
|
|
916
|
-
"x-csharp-struct": true
|
|
914
|
+
"description": "Unique session identifier"
|
|
917
915
|
},
|
|
918
916
|
"Common.Sha256Hash": {
|
|
919
917
|
"type": "string",
|
|
@@ -930,9 +928,7 @@
|
|
|
930
928
|
"description": "Unique span identifier (16 lowercase hex characters)",
|
|
931
929
|
"examples": [
|
|
932
930
|
"b7ad6b7169203331"
|
|
933
|
-
]
|
|
934
|
-
"x-csharp-type": "SpanId",
|
|
935
|
-
"x-csharp-struct": true
|
|
931
|
+
]
|
|
936
932
|
},
|
|
937
933
|
"Common.Temperature": {
|
|
938
934
|
"type": "number",
|
|
@@ -962,9 +958,7 @@
|
|
|
962
958
|
"description": "Unique trace identifier (32 lowercase hex characters)",
|
|
963
959
|
"examples": [
|
|
964
960
|
"0af7651916cd43dd8448eb211c80319c"
|
|
965
|
-
]
|
|
966
|
-
"x-csharp-type": "TraceId",
|
|
967
|
-
"x-csharp-struct": true
|
|
961
|
+
]
|
|
968
962
|
},
|
|
969
963
|
"Common.TraceParent": {
|
|
970
964
|
"type": "string",
|
|
@@ -13892,9 +13892,7 @@
|
|
|
13892
13892
|
"type": "string",
|
|
13893
13893
|
"minLength": 1,
|
|
13894
13894
|
"maxLength": 128,
|
|
13895
|
-
"description": "Unique session identifier"
|
|
13896
|
-
"x-csharp-type": "SessionId",
|
|
13897
|
-
"x-csharp-struct": true
|
|
13895
|
+
"description": "Unique session identifier"
|
|
13898
13896
|
},
|
|
13899
13897
|
"Common.Sha256Hash": {
|
|
13900
13898
|
"type": "string",
|
|
@@ -13911,9 +13909,7 @@
|
|
|
13911
13909
|
"description": "Unique span identifier (16 lowercase hex characters)",
|
|
13912
13910
|
"examples": [
|
|
13913
13911
|
"b7ad6b7169203331"
|
|
13914
|
-
]
|
|
13915
|
-
"x-csharp-type": "SpanId",
|
|
13916
|
-
"x-csharp-struct": true
|
|
13912
|
+
]
|
|
13917
13913
|
},
|
|
13918
13914
|
"Common.Temperature": {
|
|
13919
13915
|
"type": "number",
|
|
@@ -13943,9 +13939,7 @@
|
|
|
13943
13939
|
"description": "Unique trace identifier (32 lowercase hex characters)",
|
|
13944
13940
|
"examples": [
|
|
13945
13941
|
"0af7651916cd43dd8448eb211c80319c"
|
|
13946
|
-
]
|
|
13947
|
-
"x-csharp-type": "TraceId",
|
|
13948
|
-
"x-csharp-struct": true
|
|
13942
|
+
]
|
|
13949
13943
|
},
|
|
13950
13944
|
"Common.TraceParent": {
|
|
13951
13945
|
"type": "string",
|
|
@@ -320,4 +320,4 @@ export const FetchTelemetryViewValues = {
|
|
|
320
320
|
};
|
|
321
321
|
// --- contract revision (scripts/emit-contract-revision.mjs) ---
|
|
322
322
|
/** Revision of the API contract these types were emitted from; compare against HealthReport.contract_revision. */
|
|
323
|
-
export const CONTRACT_REVISION = "sha256:
|
|
323
|
+
export const CONTRACT_REVISION = "sha256:cd69d9c37a41916c";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancplua/qyl-api-schema",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "TypeSpec source of truth for qyl API contracts. Emits OpenAPI, JSON Schema, Qyl.Api.Contracts DTOs, and TypeScript contract types; not an OpenTelemetry package, storage schema, or server implementation.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"@typespec/compiler": "^1.13.0 || >=1.13.0-dev.0",
|
|
105
|
-
"@typespec/events": "^0.83.0 || ^0.84.0 || ^0.85.0",
|
|
105
|
+
"@typespec/events": "^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.86.0",
|
|
106
106
|
"@typespec/http": "^1.13.0",
|
|
107
107
|
"@typespec/openapi": "^1.13.0",
|
|
108
108
|
"@typespec/openapi3": "^1.13.0",
|
|
109
|
-
"@typespec/sse": ">=0.83.0 <0.
|
|
109
|
+
"@typespec/sse": ">=0.83.0 <0.87.0",
|
|
110
110
|
"zod": ">=4.5.0 <5"
|
|
111
111
|
},
|
|
112
112
|
"peerDependenciesMeta": {
|
|
@@ -137,12 +137,12 @@
|
|
|
137
137
|
"@ancplua/typespec-emit-ts-types": "file:./emitters/ts-types",
|
|
138
138
|
"@ancplua/typespec-qyl-lint": "file:./emitters/qyl-lint",
|
|
139
139
|
"@types/node": "26.4.1",
|
|
140
|
-
"@typespec/compiler": "1.
|
|
141
|
-
"@typespec/events": "0.
|
|
142
|
-
"@typespec/http": "1.
|
|
143
|
-
"@typespec/openapi": "1.
|
|
144
|
-
"@typespec/openapi3": "1.
|
|
145
|
-
"@typespec/sse": "0.
|
|
140
|
+
"@typespec/compiler": "1.16.0",
|
|
141
|
+
"@typespec/events": "0.86.0",
|
|
142
|
+
"@typespec/http": "1.16.0",
|
|
143
|
+
"@typespec/openapi": "1.16.0",
|
|
144
|
+
"@typespec/openapi3": "1.16.0",
|
|
145
|
+
"@typespec/sse": "0.86.0",
|
|
146
146
|
"ajv": "8.20.0",
|
|
147
147
|
"typescript": "7.0.2",
|
|
148
148
|
"zod": "4.5.4"
|