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

Update OpenAPI codegen and dependencies #215

Merged
merged 5 commits into from
May 27, 2024
Merged

Conversation

bastjan
Copy link
Contributor

@bastjan bastjan commented May 24, 2024

Builds on #183

Changes:

  • Breaking Server/Client package: Tenant and Cluster Ids are now pointers.
  • Had to fix some OpenAPI properties since the validation on the server has improved a lot:
    • Readonly means property is forbidden in request, now removed
    • Tenant/Cluster Ids are no longer required in the schema. They are optional and get set automatically if not set.
    • Removed new Host header validation by setting swagger.Servers to nil.
  • Some improved test errors

Checklist

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog

bastjan and others added 3 commits May 24, 2024 18:30
This version introduces many breaking changes, but the old code gen
behaviour can be restored with the correct configuration.

However there is currently a bug, preventing us from completely switching
back to the old behaviour. The provided config should generate
equivalent code as soon as oapi-codegen/oapi-codegen#605
is released.
The codegen does now correctly detect required attributes and fails if no id is present.
Ids are not required for `create` and set with the URL parameters for all other requsts.
@bastjan bastjan changed the title Update dependencies and codegen tool Update OpenAPI codegen and dependencies May 27, 2024
@bastjan bastjan requested a review from a team May 27, 2024 14:56
@simu
Copy link
Member

simu commented May 27, 2024

What's the impact of this breaking change for the roll out?

@bastjan
Copy link
Contributor Author

bastjan commented May 27, 2024

What's the impact of this breaking change for the roll out?

There should be no impact. Packages that import the api package will need to change some stuff around when updating, but according to known imports only steward uses the client anyways.

@bastjan bastjan merged commit f17a369 into master May 27, 2024
4 checks passed
@bastjan bastjan deleted the update-dependencies branch May 27, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants