-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update swagger generated API crates (#590)
## Type of change ``` - [ ] Bug fix - [ ] New feature development - [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ``` ## Objective Update swagger generator to version 7.2.0, pull in the new templates and generate the new API crates. I've also updated the build instructions to use .NET 8, as is required in the latest server code. The version of the server code used to generate this is bitwarden/server@fc1d7c7 I've had to make some small modifications to the server code to get it working, ~~and I'll link the PR here shortly.~~ bitwarden/server#3760 To make this easier to review, I've split this into three commits: - b42f189: Update the swagger and dotnet versions, and pull in the new templates as-is. Note that this won't generate working code. - 9727d46: Patched the provided templates to make it work with our code. This is in a separate commit to make it easier to see what we've changed and hopefully make it easier in the future to update these templates. The changes are: - Ignore warnings by default - Use Uuids instead of strings - Use serde_repr to support int enums - Disabled default features for reqwest (to remove default tls) - Removing double optionals (This could be reverted once we're better at marking everything as required in the server) - ~~f9b63606477d0f0f987b8534ef6e6755c76003a2: New autogenerated swagger code, no manually edited files here.~~ Moved to a separate PR (#593)
- Loading branch information
1 parent
575dd19
commit f16189c
Showing
10 changed files
with
175 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,71 @@ | ||
[package] | ||
name = "{{{packageName}}}" | ||
version = "{{#lambdaVersion}}{{{packageVersion}}}{{/lambdaVersion}}" | ||
{{#infoEmail}} | ||
authors = ["{{{.}}}"] | ||
{{/infoEmail}} | ||
{{^infoEmail}} | ||
authors = ["OpenAPI Generator team and contributors"] | ||
{{/infoEmail}} | ||
{{#appDescription}} | ||
description = "{{{.}}}" | ||
{{/appDescription}} | ||
{{#licenseInfo}} | ||
license = "{{.}}" | ||
{{/licenseInfo}} | ||
{{^licenseInfo}} | ||
# Override this license by providing a License Object in the OpenAPI. | ||
license = "Unlicense" | ||
{{/licenseInfo}} | ||
edition = "2018" | ||
{{#publishRustRegistry}} | ||
publish = ["{{.}}"] | ||
{{/publishRustRegistry}} | ||
{{#repositoryUrl}} | ||
repository = "{{.}}" | ||
{{/repositoryUrl}} | ||
{{#documentationUrl}} | ||
documentation = "{{.}}" | ||
{{/documentationUrl}} | ||
{{#homePageUrl}} | ||
homepage = "{{.}} | ||
{{/homePageUrl}} | ||
|
||
[dependencies] | ||
serde = "^1.0" | ||
serde_derive = "^1.0" | ||
{{#serdeWith}} | ||
serde_with = "^2.0" | ||
{{/serdeWith}} | ||
serde_json = "^1.0" | ||
serde_repr = "^0.1" | ||
url = "^2.2" | ||
uuid = { version = "^1.0", features = ["serde"] } | ||
uuid = { version = "^1.0", features = ["serde", "v4"] } | ||
{{#hyper}} | ||
hyper = { version = "~0.14", features = ["full"] } | ||
hyper-tls = "~0.5" | ||
http = "~0.2" | ||
serde_yaml = "0.7" | ||
base64 = "~0.7.0" | ||
futures = "^0.3" | ||
{{/hyper}} | ||
{{#withAWSV4Signature}} | ||
aws-sigv4 = "0.3.0" | ||
http = "0.2.5" | ||
secrecy = "0.8.0" | ||
{{/withAWSV4Signature}} | ||
{{#reqwest}} | ||
{{^supportAsync}} | ||
reqwest = "~0.9" | ||
[dependencies.reqwest] | ||
version = "^0.11" | ||
features = ["json", "blocking", "multipart"] | ||
{{/supportAsync}} | ||
{{#supportAsync}} | ||
{{#supportMiddleware}} | ||
reqwest-middleware = "0.2.0" | ||
{{/supportMiddleware}} | ||
[dependencies.reqwest] | ||
version = "^0.11" | ||
features = ["json", "multipart"] | ||
default-features = false | ||
{{/supportAsync}} | ||
{{/reqwest}} | ||
{{#withAWSV4Signature}} | ||
aws-sigv4 = "0.3.0" | ||
http = "0.2.5" | ||
secrecy = "0.8.0" | ||
{{/withAWSV4Signature}} | ||
|
||
[dev-dependencies] | ||
{{#hyper}} | ||
tokio-core = "*" | ||
{{/hyper}} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.