Skip to content

Migrate @service and @info to use valueof for the option bag#6108

Merged
timotheeguerin merged 23 commits intomicrosoft:mainfrom
timotheeguerin:migrate/valueof-remaining
Feb 28, 2025
Merged

Migrate @service and @info to use valueof for the option bag#6108
timotheeguerin merged 23 commits intomicrosoft:mainfrom
timotheeguerin:migrate/valueof-remaining

Conversation

@timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Feb 21, 2025

fix #5934

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 21, 2025

All changed packages have been documented.

  • @typespec/compiler
  • @typespec/http-server-csharp
  • @typespec/http-specs
  • @typespec/http
  • @typespec/openapi
  • @typespec/openapi3
  • @typespec/rest
  • @typespec/versioning
Show changes

@typespec/compiler - feature ✏️

Migrate @service decorator options to take in a value,> ,> diff lang="tsp",> -@service({title: "My service"}),> +@service(#{title: "My service"}),>

@typespec/openapi - feature ✏️

Migrate @info decorator to expect a value,> ,> diff lang="tsp",> -@info({ version: "1.0.0" }),> +@info(#{ version: "1.0.0" }),> ,> ,> diff lang="tsp",> -@info({,> +@info(#{,> termsOfService: "http://example.com/terms/",,> - contact: {,> + contact: #{,> name: "API Support",,> url: "http://www.example.com/support",,> email: "support@example.com",> },,> }),>

@typespec/http-server-csharp - internal ✏️

Update tests and samples

@typespec/http-specs - internal ✏️

Update tests and samples

@typespec/http - internal ✏️

Update tests and samples

@typespec/openapi3 - internal ✏️

Update tests and samples

@typespec/rest - internal ✏️

Update tests and samples

@typespec/versioning - internal ✏️

Update tests and samples

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 21, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@timotheeguerin
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@timotheeguerin
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@timotheeguerin timotheeguerin added this pull request to the merge queue Feb 28, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 28, 2025
@timotheeguerin timotheeguerin added this pull request to the merge queue Feb 28, 2025
Merged via the queue into microsoft:main with commit 3fe2d61 Feb 28, 2025
24 checks passed
@timotheeguerin timotheeguerin deleted the migrate/valueof-remaining branch February 28, 2025 20:03
github-merge-queue bot pushed a commit to Azure/typespec-azure that referenced this pull request Mar 1, 2025
dmnorc pushed a commit to dmnorc/typespec that referenced this pull request Apr 9, 2025
jbethune pushed a commit to jbethune/typespec101-files that referenced this pull request Nov 16, 2025
The example code no longer compiles because the @service decorator
expects an #object value parameter in post-1.0 typespec code.

Relevant upstream PR:

* microsoft/typespec#6108

The updated code has been tested with the latest typespec 1.6 compiler
and language server.
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.

Migrate http and openapi decorators to use valueof

3 participants