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

Add support for URI templates #3932

Merged
merged 35 commits into from
Aug 6, 2024

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Jul 22, 2024

fix #3736

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jul 22, 2024

All changed packages have been documented.

  • @typespec/compiler
  • @typespec/http
  • @typespec/openapi3
  • @typespec/rest
Show changes

@typespec/http - feature ✏️

@route can now take a uri template as defined by RFC-6570,> ,> tsp,> @route("files{+path}") download(path: string): void;,>

@typespec/openapi3 - feature ✏️

Add support for URI templates in routes

@typespec/rest - feature ✏️

Add support for URI templates in routes

@typespec/http - deprecation ✏️

API deprecation: HttpOperation#pathSegments is deprecated. Use HttpOperation#uriTemplate instead.

@typespec/http - deprecation ✏️

Deprecated @query({format: }) option. Use @query(#{explode: true}) instead of form or multi format. Previously csv/simple is the default now.,> Decorator is also expecting an object value now instead of a model. A deprecation warning with a codefix will help migrating.,> ,> diff,> - @query({format: "form"}) select: string[];,> + @query(#{explode: true}) select: string[];,>

@typespec/compiler - feature ✏️

Add ArrayEncoding enum to define simple serialization of arrays

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

@timotheeguerin timotheeguerin marked this pull request as ready for review July 22, 2024 22:09
packages/http/lib/decorators.tsp Outdated Show resolved Hide resolved
packages/http/lib/decorators.tsp Outdated Show resolved Hide resolved
packages/http/test/routes.test.ts Outdated Show resolved Hide resolved
packages/http/lib/decorators.tsp Show resolved Hide resolved
packages/http/lib/decorators.tsp Outdated Show resolved Hide resolved
packages/http/src/parameters.ts Show resolved Hide resolved
packages/http/src/operations.ts Outdated Show resolved Hide resolved
timotheeguerin and others added 3 commits July 25, 2024 15:33
Co-authored-by: Christopher Radek <14189820+chrisradek@users.noreply.github.com>
@weidongxu-microsoft
Copy link
Contributor

weidongxu-microsoft commented Aug 5, 2024

Would there be pending update on e.g. typespec-azure-core lib on @query({format: "multi"}) -> @query(#{explode: true})?
https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-core/lib/models.tsp#L93-L95

@timotheeguerin
Copy link
Member Author

Would there be pending update on e.g. typespec-azure-core lib on @query({format: "multi"}) -> @query(#{explode: true})? https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-core/lib/models.tsp#L93-L95

yes azure repo has its own pr taking the change Azure/typespec-azure#1247

@timotheeguerin timotheeguerin added this pull request to the merge queue Aug 6, 2024
Merged via the queue into microsoft:main with commit e492ff7 Aug 6, 2024
22 checks passed
@timotheeguerin timotheeguerin deleted the uri-templates branch August 6, 2024 19:14
timotheeguerin added a commit to Azure/typespec-azure that referenced this pull request Aug 6, 2024
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.

URI templates support
7 participants