Open weidongxu-microsoft opened 1 year ago
PS: also evaluate on whether it may be integrated in CI
e.g. https://github.com/Azure/azure-sdk-for-java/pull/32498 this one for swagger/readme.md
official spec guide is here https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/cadl-structure-guidelines.md
please make a short paragraph to guide service to use the script from SDK repo. Plan to insert that into https://github.com/Azure/azure-sdk-for-java/wiki/Cadl-Java-Quickstart#use-cadl (before that section, as recommend service to do this together with their spec repo)
Regarding to integrating the script in CI, there are two places to run the script.
One is to have a seperate CI running on merged branch(usually main branch) like lite gen CI. So we can just generate sdk using CI instead of generating locally. The CI will:
The other is to trigger the script in pr. But I can't think of a meaningful use case.
Please let me know your thoughts on where to run the scripts in CI.
The CI step Alan did, was to make sure the code is always latest (from codegen), before release etc.
We don't need a fluent lite gen CI. Data-plane PR is done by service, and they can use the automation from spec to do the PR. They don't need to first configure spec repo, then get to SDK repo do generate code.
First let's get MVAD regened and we can get it merged.
First let's get MVAD regened and we can get it merged.
Got it, make sense, working on it now.
ref: https://github.com/Azure/azure-sdk-tools/pull/5272/files (scripts are syned to sdk repo)
Our first case can be MVAD https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/AnomalyDetector (you can use other case)
We do not need to able to run automation or CI on it.
First we probably just want to add the
cadl-location.yaml
, and able to locally run the PS script to generate the code.Later we can worry about automation or other script for first-time SDK onboard (client_version.txt, ci.yml, pom.yml etc.)
Feel free to collaborate with @XiaofeiCao as he might be more familiar with SDK repo scripts.