Skip to content

Commit 02cb5fd

Browse files
committed
build(spec): bump TypeSpec to 1.13.0-dev and drop #10677 workaround
Both upstream fixes are now in the @typespec/openapi3 prerelease line: - microsoft/typespec#10677 (auth scheme models leaking into components.schemas) - move basicAuth/bearerAuth/openId back into `namespace LibreGraph` and drop the workaround comments. - microsoft/typespec#10656 (uniqueItems lost on operation parameters) - already wired up in source via `@TypeSpec.JsonSchema.uniqueItems`, now actually takes effect, so the generated TS axios client params flip from `Array<EnumX>` back to `Set<EnumX>` for $select / $expand / $orderby (matching the original v1.0.yaml surface). Pinning to explicit dev versions rather than the `next` dist-tag because npm resolves a bare "next" specifier against `latest` for prerelease tags.
1 parent 099e4ac commit 02cb5fd

4 files changed

Lines changed: 132 additions & 119 deletions

File tree

spec/auth.tsp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,7 @@ import "@typespec/openapi";
44
using Http;
55
using OpenAPI;
66

7-
// Auth scheme declarations live in the global namespace, NOT inside
8-
// `LibreGraph`, to work around microsoft/typespec#10677: when an auth
9-
// scheme model is declared inside the service namespace, the
10-
// openapi3 emitter also emits it under `components.schemas` (in
11-
// addition to the correct `components.securitySchemes`), and any
12-
// `@extension` on the model propagates to both locations. Extensions
13-
// valid for `securitySchemes` (like `bearerFormat`) are rejected by
14-
// downstream validators when they appear under `schemas`.
15-
//
16-
// Move the models back into `main.tsp` (alongside `@useAuth(...)`) once
17-
// the upstream fix is released.
7+
namespace LibreGraph;
188

199
@doc("HTTP Basic Authentication (discouraged for production environments)")
2010
model basicAuth {

spec/main.tsp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ using OpenAPI;
2525

2626
// API-level auth: an operation accepts either OpenID Connect or HTTP Basic.
2727
// Education endpoints override this to require Bearer tokens (see
28-
// education.tsp). The auth scheme models are declared in `auth.tsp` at
29-
// global namespace (workaround for microsoft/typespec#10677).
28+
// education.tsp).
3029
@useAuth(openId | basicAuth)
3130
@service(#{ title: "Libre Graph API" })
3231
@info(#{

spec/package-lock.json

Lines changed: 125 additions & 101 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"build": "tsp compile ."
88
},
99
"dependencies": {
10-
"@typespec/compiler": "^1.5.0",
11-
"@typespec/http": "^1.5.0",
12-
"@typespec/json-schema": "^1.12.0",
13-
"@typespec/openapi": "^1.5.0",
14-
"@typespec/openapi3": "^1.5.0"
10+
"@typespec/compiler": "1.13.0-dev.5",
11+
"@typespec/http": "1.13.0-dev.0",
12+
"@typespec/json-schema": "1.13.0-dev.1",
13+
"@typespec/openapi": "1.13.0-dev.0",
14+
"@typespec/openapi3": "1.13.0-dev.2"
1515
}
1616
}

0 commit comments

Comments
 (0)