Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest - filter string constant path http properties when using @autoRoute #6326

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

chrisradek
Copy link
Member

#6311 switched openapi3 to use HttpProperty instead of HttpOperationParameter. The @typespec/rest package did some filtering of parameters under a couple conditions (including path constants) that wasn't applied to properties. This caused an extra path parameter to be emitted in OpenAPI3 (and typespec-autorest when eventually applying the same changes there).

This PR applies the same @autoRoute parameter filtering to properties.

@azure-sdk
Copy link
Collaborator

All changed packages have been documented.

  • @typespec/rest
Show changes

@typespec/rest - fix ✏️

Updates @autoRoute behavior to apply same HttpOperationParameter filtering to HttpProperty

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@chrisradek chrisradek added this pull request to the merge queue Mar 7, 2025
Merged via the queue into microsoft:main with commit 7a77cf4 Mar 7, 2025
23 checks passed
@chrisradek chrisradek deleted the rest-prop-filtering branch March 7, 2025 18:53
archerzz pushed a commit to archerzz/typespec that referenced this pull request Mar 10, 2025
…oute` (microsoft#6326)

microsoft#6311 switched openapi3 to use `HttpProperty` instead of
`HttpOperationParameter`. The `@typespec/rest` package did some
filtering of parameters under a couple conditions (including path
constants) that wasn't applied to properties. This caused an extra path
parameter to be emitted in OpenAPI3 (and typespec-autorest when
eventually applying the same changes there).

This PR applies the same `@autoRoute` parameter filtering to properties.

---------

Co-authored-by: Christopher Radek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants