Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 4.08 KB

File metadata and controls

45 lines (32 loc) · 4.08 KB

FAQ in Swagger PR Review

This page is intended to answer questions frequently asked during Azure Swagger PR review.

  1. I am new to Swagger/OpenAPI, How should I start?
  2. How to fix validation failure?
  3. How to generate SDK from Swagger?
  4. How to generate document
  5. How to generate swagger examples
  6. If need further help, who can we contact?

How to onboard PR review Process?

If you are new to Swagger/OpenAPI, you can refer to this document

If you are new to Swagger PR review process, you can refer to this flowchart

You can refer to this document to get read permission to submit PR.

How to fix validation failure?

Validation Description How to fix
Model Validation Model validation enforces correctness between example and swagger. It checks whether definitions for request parameters and responses, match an expected input/output payload of the service. Here
Lint diff A tool to check whether changes in PR are satisfied with certain kind of rules outlined in the automated rules checklist Here
Breaking Change A tool to check what a swagger PR has changed and whether these changes violate breaking changes rules. Here
Avocado Avocado validates folder structure and configuration. Here
Semantic Semantic validation enforces correctness on the swagger specific elements. Such as paths and operations. Ensure the element definition meet the OpenApi 2.0 specification. Here
Prettier Code formatter for Swagger Here
BranchProtectionForPrivateRepo BranchProtectionForPrivateRepo is designed to always fail to prevent from merging PR into master which is not allow in private swagger repo as it will cause issue to sync up from public repo. You can ignore this failure

Refer to Document for how to run these tools locally

How to generate SDK from Swagger?

If you are working in the public repository,SDK generation is triggered as soon as your OpenAPI specification (a.k.a swagger) PR is created/committed/merged in to the azure-rest-api-specs repository.

If you are working in the private repository, please refer to this document to manually generate SDKs of different languages, including Python, Java, Go, C#, Js etc.

How to generate Document from Swagger?

Refer to document

How to generate examples from Swagger?

Refer to Swagger-Example-Generation

If need further help, who can we contact?

If any other help need, Please send a mail to vscswagger@microsoft.com