Update OpenAPI version and templates #296
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
📔 Objective
Update the version of openapi generator that we use, and use the latest templates. Because of the autogenerated code, this PR is fairly big so I've split it into easier to parse commits. I recommend reviewing them individually:
Update versions: Very straightforward, just bumps all the packages. This doesn't change the generated code in any way
Update template files: This updates the template files with the latest in the openAPI repo. Note that this is the templates as they are upstream, without our changes. The next commit will apply only our changes, so it's easy to review and rebase in the future. I basically deleted the contents of the
support/openapi-templates
and pasted the contents from here: https://github.com/OpenAPITools/openapi-generator/tree/05e672d85672a2f7a97fe0d3601aadc26d43e572/modules/openapi-generator/src/main/resources/rust Best way to validate it's correct would be to do the same thing and check that the files match.Make changes to templates. The changes applied are as follows:
uuid
crate type instead of strings.nullable & !required
. We don't differentiate between nullable and !required, so the double optional only adds complexity.Cargo.toml
so it's more in line with ours.🤖 Generated code: This is the autogenerated bindings built using
./support/build-api.sh
on the same server version as last time bitwarden/server@29dc69a . I haven't used a newer version to reduce the number of changes on this PR. The changes are entirely because of template updates, so rather than review it I'd recommend trying to build the bindings on top and seeing if they match:⏰ Reminders before review
team
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes