Description
Create API review automatically from PR for CADL changes.
Below are the steps to create API review for CADL.
-
Install CADL compiler and CADL APIreview parser
npm install -g @cadl-lang/compiler@0.37.0
npm install -g @azure-tools/cadl-apiview@0.3.0 -
Change working directory to CADL package root in specific folder as in below e.g. and run following commands to install dependencies and compile CADL
For .g. https://github.com/Azure/azure-rest-api-specs/tree/feature/confidentialledger/cadl/specification/confidentialledger/ConfidentialLedgernpm install
cadl compile . --emit=@azure-tools/cadl-apiview -
Step Adding status badges #2 should create a JSON file in output path within package root.
./ cadl-output/apiview.json -
Rename apiview.json to .json and publish it as artifact. In this case file should be renamed as ConfidentialLedger.json. @Travis Prescott Can Parser generate APIView file with a name matching package root path? APIView will show same name for all reviews without this naming change.
-
Send REST API to APIView to create API review using same REST API used for Swagger API review. Only difference is that there won’t be any baseline name parameter in request.
Metadata
Assignees
Type
Projects
Status
✅ Done