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

Update the version format check for canonical swagger #707

Open
dinwa-ms opened this issue Jun 11, 2024 · 5 comments
Open

Update the version format check for canonical swagger #707

dinwa-ms opened this issue Jun 11, 2024 · 5 comments

Comments

@dinwa-ms
Copy link

dinwa-ms commented Jun 11, 2024

Lint rule description

For canonical swagger, the version info is "canonical", which violates the existing rule of the formate "Year-Month-Date". Can we make this a special case for canonical swagger?

image

There are some discussion about it in the channel

image

Related swagger example

{
"swagger": "2.0",
"info": {
"title": "Microsoft.Contoso management service",
"version": "canonical",
"description": "Microsoft.Contoso Resource Provider management API.",
"x-canonical-included-versions": [
"v2021_10_01_preview"
],
"x-typespec-generated": [
{
"emitter": "@azure-tools/typespec-autorest-canonical"
}
]
},
"schemes": [
"https"
],
...

Category

SDK

Severity level

Error

Applies to

Management plane API spec, Data plane API spec, RPaaS API spec

How to fix the violation

For canonical swagger, set the version to "canonical"; for versioned swagger, set the version to the specific version.

What't the impact if breaking the rule

The information will be misleading.

@mikeharder mikeharder self-assigned this Jun 11, 2024
@dinwa-ms
Copy link
Author

Could you help provide an update on this issue? Thanks

@mikeharder
Copy link
Member

@rkmanda @bdefoy @tejaswiMinnu @AkhilaIlla: I believe this is an ARM-only rule:

@mikeharder mikeharder removed their assignment Jul 15, 2024
@dinwa-ms
Copy link
Author

Hi @rkmanda @bdefoy @tejaswiMinnu @AkhilaIlla, may I ask is anyone working on this issue and is there any update or ETA on it? Thanks.

@dinwa-ms
Copy link
Author

If it hasn't started, I can try to work on it and will share the code change for review.

@dinwa-ms
Copy link
Author

Created PR for this issue
Update arm APIVersionPattern rule for canonical swagger #732

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

No branches or pull requests

2 participants