Skip to content

Commit

Permalink
Bump core from 1d6d1ce to 8ed1d82 (#225)
Browse files Browse the repository at this point in the history
Bumps [core](https://github.com/microsoft/typespec) from `1d6d1ce` to
`8ed1d82`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/typespec/commit/8ed1d82e7ccb0a8b72ae902149b86d68ac684872"><code>8ed1d82</code></a>
Add support for openIdConnect auth scheme (<a
href="https://github.com/microsoft/typespec/issues/2811">#2811</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/fd4fdfb9af3b634742a477cd543cfeedbcd6c5b3"><code>fd4fdfb</code></a>
Fix: Error out when using properties in array model (<a
href="https://github.com/microsoft/typespec/issues/2873">#2873</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/cc2723ae501ee2c46b66f5cbb8aa8fb42195e291"><code>cc2723a</code></a>
Template instantiated with ErrorType will get the arg changed to unknown
(<a
href="https://github.com/microsoft/typespec/issues/2874">#2874</a>)</li>
<li>See full diff in <a
href="https://github.com/microsoft/typespec/compare/1d6d1ce739d87a4411b3136b2beb67132bcb821d...8ed1d82e7ccb0a8b72ae902149b86d68ac684872">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Timothee Guerin <[email protected]>
  • Loading branch information
dependabot[bot] and timotheeguerin committed Feb 6, 2024
1 parent 3997779 commit 8b072f4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-brooms-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@azure-tools/typespec-autorest": patch
---

Emit warning if using opendIdConnect http auth scheme
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"packageManager": "[email protected]",
"scripts": {
"run-all": "pnpm -r --filter='!./core'",
"run-all": "pnpm -r --filter=!./core/",
"build": "pnpm run-all --workspace-concurrency=Infinity --aggregate-output --reporter=append-only build ",
"check-format": "pnpm run prettier --check",
"check-version-mismatch": "syncpack list-mismatches",
Expand Down
6 changes: 6 additions & 0 deletions packages/typespec-autorest/src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ const libDef = {
default: paramMessage`'${"schema"}' format '${"format"}' is not supported in Autorest. It will not be emitted.`,
},
},
"unsupported-auth": {
severity: "warning",
messages: {
default: paramMessage`Authentication "${"authType"}" is not a known authentication by the openapi3 emitter, it will be ignored.`,
},
},
},
emitter: {
options: EmitterOptionsSchema as JSONSchemaType<AutorestEmitterOptions>,
Expand Down
11 changes: 9 additions & 2 deletions packages/typespec-autorest/src/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ function createOAPIEmitter(
},
};
let root: OpenAPI2Document;
let currentService: Service;
let currentEndpoint: OpenAPI2Operation;
let currentConsumes: Set<string>;
let currentProduces: Set<string>;
Expand Down Expand Up @@ -327,6 +328,7 @@ function createOAPIEmitter(
services.push({ type: program.getGlobalNamespaceType() });
}
for (const service of services) {
currentService = service;
const originalProgram = program;
const versions = buildVersionProjections(program, service.type).filter(
(v) => !options.version || options.version === v.version
Expand Down Expand Up @@ -2228,9 +2230,14 @@ function createOAPIEmitter(
} as any,
flow.scopes.map((x) => x.value),
];
case "openIdConnect":
default:
const _assertNever: never = auth;
compilerAssert(false, "Unreachable");
reportDiagnostic(program, {
code: "unsupported-auth",
format: { authType: (auth as any).type },
target: currentService.type,
});
return undefined;
}
}

Expand Down

0 comments on commit 8b072f4

Please sign in to comment.