Skip to content

typespec-autorest - make path parameters required#2762

Merged
chrisradek merged 3 commits intoAzure:mainfrom
chrisradek:autorest-path-required
May 29, 2025
Merged

typespec-autorest - make path parameters required#2762
chrisradek merged 3 commits intoAzure:mainfrom
chrisradek:autorest-path-required

Conversation

@chrisradek
Copy link
Copy Markdown
Member

@chrisradek chrisradek commented May 29, 2025

Fixes #2704

This does have the side-effect of forcing x-ms-parameterized-host params to be required - but checking the 52 files that use @server in the specs repo - they all have these params as required already.

Will keep in draft until I finish running typespec-next changes in specs repo - all clear!

@azure-sdk
Copy link
Copy Markdown
Collaborator

All changed packages have been documented.

  • @azure-tools/typespec-autorest
Show changes

@azure-tools/typespec-autorest - fix ✏️

Emits all path parameters as required even if optional in TypeSpec. Reports a new warning if an optional path parameter is found: @azure-tools/typespec-autorest/unsupported-optional-path-param.

@azure-sdk
Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website

@chrisradek chrisradek marked this pull request as ready for review May 29, 2025 22:46
@chrisradek chrisradek added this pull request to the merge queue May 29, 2025
Merged via the queue into Azure:main with commit 7882c32 May 29, 2025
22 checks passed
@chrisradek chrisradek deleted the autorest-path-required branch May 29, 2025 23:20
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.

Invalid swagger for optional path parameters

3 participants