-
Notifications
You must be signed in to change notification settings - Fork 45
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 schemas consistent with API #348
Conversation
d8d5914
to
0b42af2
Compare
48ce359
to
007ce46
Compare
007ce46
to
b9a610d
Compare
Isn't this a breaking change ? Or at least a feature? |
The |
Alright, do we use it externally? Or could we consider moving it into a |
We use them in |
We use it externally to implement the JSON output, as only the schema types contain the JSON tags |
I did a search for the import path, and it looks like its only used in |
I made it a fix so it shows up in the changelog. I think that should be enough |
🤖 I have created a release *beep* *boop* --- ## [2.5.0](v2.4.0...v2.5.0) (2023-12-12) ### Features * add conversion methods from schema to hcloud objects ([#343](#343)) ([6feda4d](6feda4d)) * add interfaces for client structs ([#342](#342)) ([4f9390f](4f9390f)) * add missing properties ([#349](#349)) ([c8a28d0](c8a28d0)) * **error:** include http response in api errors ([#320](#320)) ([9558239](9558239)) ### Bug Fixes * make schemas consistent with API ([#348](#348)) ([b0d7055](b0d7055)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
In some places the schema definitions are not consistent with the API documentation, for example properties may not have pointer receivers even though they are marked as optional in the documentation. This results in inconsistent JSON when converting
JSON -> Schema -> JSON
(as seen for example in hetznercloud/cli#461, where one output is the exact API response and one is serialized and then converted back to JSON).This PR aims to fix this issue by making the schema definitions consistent.