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

Fix UCP examples to conform with oav validate-example command #4532

Merged
merged 21 commits into from
Nov 16, 2022

Conversation

asilverman
Copy link
Contributor

@asilverman asilverman commented Nov 8, 2022

Description

The examples we specify in our OpenAPI spec (x-ms-examples) should be verified to conform to the spec. This PR adds a check for the UCP OpenAPI spec in the CI/CD pipeline to ensure that moving forward we update any drifts from the spec as the spec evolves.

Fixes #4566

Changes

  • Updates to using latest autorest
  • Makes some changes to ucp.json spec to remove async operations (per conversation with @Vinaya)
  • Adds CI/CD task to run oav tool on ucp.json
  • Regenerate client libraries
  • Make credentials a TrackedResource
  • Add examples for AWS Credential resources
  • Add api-version param to Credentials

pkg/ucp/api/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@vinayada1 vinayada1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plane/resourcegroup changes look good

@asilverman asilverman force-pushed the asilverman/spec-validation branch from 135cfde to 73a4863 Compare November 9, 2022 17:55
@asilverman asilverman marked this pull request as ready for review November 9, 2022 18:21
@asilverman asilverman requested a review from a team as a code owner November 9, 2022 18:21
@asilverman asilverman force-pushed the asilverman/spec-validation branch from 5b72e6e to b2e97bb Compare November 9, 2022 19:38
@asilverman asilverman changed the title MAINT: Fix UCP examples to conform with oav validate-example command Fix UCP examples to conform with oav validate-example command Nov 9, 2022
@asilverman asilverman requested a review from vinayada1 November 9, 2022 21:53
@asilverman asilverman self-assigned this Nov 9, 2022
@asilverman asilverman requested a review from ytimocin November 14, 2022 20:50
@nithyatsu
Copy link
Contributor

Is there some instruction to run the oav locally?

@youngbupark
Copy link

youngbupark commented Nov 14, 2022

@asilverman thanks for this work. I have the suggestion. We have not run the linter for all swagger files for a while. We can add oav linter CI check first but set it as optional check, so it should not block PR merge.

Then we can fix the discovered linter errors iteratively. WDYT?

Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (needs a rebase)

@asilverman
Copy link
Contributor Author

asilverman commented Nov 15, 2022

Is there some instruction to run the oav locally?

Yes - make test-ucp-spec-examples

@asilverman asilverman merged commit ccd7611 into main Nov 16, 2022
@asilverman asilverman deleted the asilverman/spec-validation branch November 16, 2022 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable oav validation for ucp.json
7 participants