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

[TypeSpec Requirement] Fail if PR contains handwritten swagger but "stable" contains typespec-generated #28697

Open
mikeharder opened this issue Apr 15, 2024 · 1 comment
Assignees

Comments

@mikeharder
Copy link
Member

mikeharder commented Apr 15, 2024

  • If a swagger is not typespec-generated in a PR
    • For each Swagger in stable in main:
      • If it is typespec-generated
        • PR must be typespec-generated
        • return/break
    • If GA Swaggers exist and no Swagger from TypeSpec were found
      • the swagger in the PR can be hand-written

To implement check, use the database at https://raw.githubusercontent.com/Azure/azure-sdk/main/_data/releases/latest/specs.csv, instead of querying the main git branch directly.

Example pwsh downloading DB:

https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/Package-Properties.ps1#L139

@mikeharder mikeharder self-assigned this Apr 15, 2024
@catalinaperalta
Copy link
Member

+1. This will make the check a lot more helpful in catching corner cases where teams reverted back to swagger for any reason.

@mikeharder mikeharder changed the title [TypeSpecRequirement] Fail if PR contains handwritten swagger but "stable" contains typespec-generated [TypeSpec Requirement] Fail if PR contains handwritten swagger but "stable" contains typespec-generated Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants