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: make API Server OpenAPI compliant #709

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

joakimmohn
Copy link
Contributor

@joakimmohn joakimmohn commented Mar 19, 2023

Description of your changes

This PR fixes the incompliant swagger specification that is generated by the API Server module. This will let us generate SDKs from the generated swagger.

Validate fix using openapi generator:

openapi-generator generate -i docs/apidoc/swagger.json -g java -o _tmp

Or using swagger-cli:

swagger-cli validate docs/apidoc/swagger.json

Fixes kubevela/kubevela#5536

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run yarn lint to ensure the frontend changes are ready for review.
  • Run make reviewableto ensure the server changes are ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

Special notes for your reviewer

I would be happy to pick up the related task: kubevela/kubevela#5428 as part of GSOC.

@codecov
Copy link

codecov bot commented Mar 19, 2023

Codecov Report

Patch coverage has no change and project coverage change: -26.68 ⚠️

Comparison is base (7ed1897) 58.80% compared to head (71ab5ec) 32.12%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #709       +/-   ##
===========================================
- Coverage   58.80%   32.12%   -26.68%     
===========================================
  Files          94       78       -16     
  Lines       17596    16555     -1041     
===========================================
- Hits        10348     5319     -5029     
- Misses       5929    10444     +4515     
+ Partials     1319      792      -527     
Flag Coverage Δ
apiserver-unittests 32.12% <0.00%> (+0.02%) ⬆️
server-e2e-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/server/interfaces/api/addon.go 1.75% <ø> (-68.12%) ⬇️
pkg/server/interfaces/api/cloudshell.go 3.30% <0.00%> (-45.44%) ⬇️
pkg/server/interfaces/api/definition.go 1.57% <0.00%> (-60.03%) ⬇️
pkg/server/interfaces/api/project.go 0.27% <0.00%> (-42.51%) ⬇️
pkg/server/interfaces/api/repository.go 0.84% <0.00%> (-45.94%) ⬇️
pkg/server/interfaces/api/user.go 1.03% <0.00%> (-53.47%) ⬇️

... and 73 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Joakim Mohn <joakim.mohn@gmail.com>
@joakimmohn joakimmohn force-pushed the api-server-open-api-compliant branch from 3427bc6 to 71ab5ec Compare March 20, 2023 19:35
Copy link
Collaborator

@barnettZQG barnettZQG left a comment

Choose a reason for hiding this comment

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

lgtm

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.

Kubevela rest API is not OpenAPI/Swagger spec compliant
2 participants