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

Deprecate @service version and allow @OpenAPI.info to take all properties allowed by openapi #2902

Merged

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Feb 9, 2024

fix #2821

Deprecate @service({version

Using this property will emit a deprecation warning

Cover everything with @OpenAPI.info

Makes sure all the properties allowed on the info object of openapi specification can also be provided in @info. The properties will either override other ways of specifying those previously or be the only way.

  • @info({description would override @doc on service namespace
  • @info({summary would override @summary on service namespace
  • @info({title would override @service({title} on service namespace

@timotheeguerin timotheeguerin changed the title Deprecate service version Deprecate @service version and allow @OpenAPI.info to take all properties allowed by openapi Feb 9, 2024
@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 9, 2024

All changed packages have been documented.

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/2902/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/2902/

@timotheeguerin timotheeguerin added the deprecation A previously supported feature will now report a warning and eventually be removed label Feb 9, 2024
Copy link
Member

@bterlson bterlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the info block allows arbitrary extensions (prefixed with x-), but I suspect these are not commonly used. If we need to support them, presumably we can add another optional parameter.

@timotheeguerin timotheeguerin enabled auto-merge (squash) February 28, 2024 22:38
@timotheeguerin timotheeguerin merged commit 717af64 into microsoft:main Feb 28, 2024
14 checks passed
@timotheeguerin timotheeguerin deleted the deprecate-service-version branch February 28, 2024 22:56
markcowl pushed a commit to markcowl/cadl that referenced this pull request Mar 8, 2024
…operties allowed by openapi (microsoft#2902)

fix [microsoft#2821](microsoft#2821)

## Deprecate `@service({version`

Using this property will emit a deprecation warning

## Cover everything with `@OpenAPI.info`

Makes sure all the properties allowed on the `info` object of openapi
specification can also be provided in `@info`. The properties will
either override other ways of specifying those previously or be the only
way.
- `@info({description` would override `@doc` on service namespace
- `@info({summary` would override `@summary` on service namespace
- `@info({title` would override `@service({title}` on service namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation A previously supported feature will now report a warning and eventually be removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate @service({version}
3 participants