You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 🎟️ Tracking
<!-- Paste the link to the Jira or GitHub issue or otherwise describe /
point to where this change is coming from. -->
## 📔 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](5b8c947):
Very straightforward, just bumps all the packages. This doesn't change
the generated code in any way
- [Update template
files](82d4429):
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](272d541).
The changes applied are as follows:
- Use the `uuid` crate type instead of strings.
- Removed the double optional pattern, which was applied when types were
`nullable & !required`. We don't differentiate between nullable and
!required, so the double optional only adds complexity.
- Updated `Cargo.toml` so it's more in line with ours.
- Ignored some clippy lints
- The new templates already contain support for int enums, so that's one
less patch we have to do
- [🤖 Generated
code](fff9127):
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:
- Models are functionally identical, their Display impl is slightly
different but has the same output.
- API functions are restructured internally, and they now check for a
JSON content type before trying to deserialize the response.
- I've kept the Cargo.toml changes as they were before, because our
version is updated with renovate updates.
## ⏰ Reminders before review
- Contributor guidelines followed
- All formatters and local linters executed and passed
- Written new unit and / or integration tests where applicable
- Protected functional changes with optionality (feature flags)
- Used internationalization (i18n) for all UI strings
- CI builds passed
- Communicated to DevOps any deployment requirements
- Updated any necessary documentation (Confluence, contributing docs) or
informed the documentation
team
## 🦮 Reviewer guidelines
<!-- Suggested interactions but feel free to use (or not) as you desire!
-->
- 👍 (`:+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 confirmed
issue 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
0 commit comments