Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
109 stars 167 forks source link

REST API PR pipeline should build and store OpenAPI from TypeSpec #3573

Open mikekistler opened 2 years ago

mikekistler commented 2 years ago

The REST API Pipeline should run the Cadl compiler to generate the OpenAPI for a service team's Cadl file and add these files to the PR automatically.

raych1 commented 1 year ago

Moved this item to backlog as it's not urgent.

mikekistler commented 1 year ago

Need to wait for directory structure, etc. topics to settle before we can do this.

raych1 commented 1 year ago

Starting from API spec pipeline to support swagger auto generation from CADL.

raych1 commented 1 year ago

Hold off this task as the swagger example needs to be considered as part of this automation effort because example is requried along with swagger when check specs into azure rest api spec repo.

CADL doesn't support native example so it uses swagger example instead. Swagger example can be automatically generated by oav tool but every time of generation the radom string generated will be different which causes the value overridden. We need to either support generating fixed string value or skipping generation if example exists.

konrad-jamrozik commented 1 year ago

@mikekistler I wonder if this is still relevant. It also seems to me it might be quite a big chunk of work, judging by the description.

mikekistler commented 1 year ago

This is still relevant. My understanding is that there is concern about pushing commits into PRs, but I don't understand the specifics of that concern. The azure-docs-rest-apis pipeline does add new commits to PRs, so it is clearly possible.

konrad-jamrozik commented 2 months ago

Currently we are deeply into figuring out the correct dir structure. Newest here:

@mikekistler re the concern of "do not make automation push changes to PRs automatically" - the sad truth is that many engineers have very weak grasp of how Git branching model operates, hence automation pushing commits to PRs often leads to confusion and increased support burden.

@mikeharder just FYI we have this issue on backlog since almost 2 years.