From 3d578164e8564beccdb2375ed6129c5bcfc8be13 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Fri, 28 Oct 2022 18:00:02 +0800 Subject: [PATCH] Sync Cargo.toml project metadata attributes (#13824) --- .../main/resources/rust-server/Cargo.mustache | 13 ++++++++- .../src/main/resources/rust/Cargo.mustache | 27 +++++++++++++++++++ .../petstore/rust/hyper/petstore/Cargo.toml | 2 ++ .../rust/reqwest/petstore-async/Cargo.toml | 2 ++ .../petstore-awsv4signature/Cargo.toml | 2 ++ .../petstore/rust/reqwest/petstore/Cargo.toml | 2 ++ .../output/multipart-v3/Cargo.toml | 3 ++- .../output/no-example-v3/Cargo.toml | 3 ++- .../rust-server/output/openapi-v3/Cargo.toml | 3 ++- .../rust-server/output/ops-v3/Cargo.toml | 3 ++- .../Cargo.toml | 4 +-- .../output/ping-bearer-auth/Cargo.toml | 3 ++- .../output/rust-server-test/Cargo.toml | 3 ++- 13 files changed, 61 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache index fba4aeda686b..af14c03d3588 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache @@ -1,11 +1,22 @@ [package] name = "{{{packageName}}}" version = "{{{packageVersion}}}" -authors = [{{#infoEmail}}"{{{.}}}"{{/infoEmail}}] +{{#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 = ["{{.}}"] diff --git a/modules/openapi-generator/src/main/resources/rust/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust/Cargo.mustache index b04f06d41e80..98b1024cc0a0 100644 --- a/modules/openapi-generator/src/main/resources/rust/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust/Cargo.mustache @@ -1,8 +1,35 @@ [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" diff --git a/samples/client/petstore/rust/hyper/petstore/Cargo.toml b/samples/client/petstore/rust/hyper/petstore/Cargo.toml index 22e2942f1591..46601e7408ef 100644 --- a/samples/client/petstore/rust/hyper/petstore/Cargo.toml +++ b/samples/client/petstore/rust/hyper/petstore/Cargo.toml @@ -2,6 +2,8 @@ name = "petstore-hyper" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +description = "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters." +license = "Apache-2.0" edition = "2018" [dependencies] diff --git a/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml index cc8c0f96a8dd..5bae03671171 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml @@ -2,6 +2,8 @@ name = "petstore-reqwest-async" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +description = "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters." +license = "Apache-2.0" edition = "2018" [dependencies] diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml index f6b41e837a30..beef9b801cf8 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml @@ -2,6 +2,8 @@ name = "petstore-reqwest-awsv4signature" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +description = "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters." +license = "Apache-2.0" edition = "2018" [dependencies] diff --git a/samples/client/petstore/rust/reqwest/petstore/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore/Cargo.toml index 27b5078138ee..ca255dfed885 100644 --- a/samples/client/petstore/rust/reqwest/petstore/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore/Cargo.toml @@ -2,6 +2,8 @@ name = "petstore-reqwest" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +description = "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters." +license = "Apache-2.0" edition = "2018" [dependencies] diff --git a/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml b/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml index 22eca2e721b4..02def281f903 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "multipart-v3" version = "1.0.7" -authors = [] +authors = ["OpenAPI Generator team and contributors"] description = "API under test" +# Override this license by providing a License Object in the OpenAPI. license = "Unlicense" edition = "2018" diff --git a/samples/server/petstore/rust-server/output/no-example-v3/Cargo.toml b/samples/server/petstore/rust-server/output/no-example-v3/Cargo.toml index 1790dc9d99db..f35a30ca567b 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/no-example-v3/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "no-example-v3" version = "0.0.1" -authors = [] +authors = ["OpenAPI Generator team and contributors"] description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" +# Override this license by providing a License Object in the OpenAPI. license = "Unlicense" edition = "2018" diff --git a/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml b/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml index 6a8b56d59c9d..3efb7b12fa7d 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "openapi-v3" version = "1.0.7" -authors = [] +authors = ["OpenAPI Generator team and contributors"] description = "API under test" +# Override this license by providing a License Object in the OpenAPI. license = "Unlicense" edition = "2018" diff --git a/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml b/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml index bcf692a43a44..e8eca6f65e97 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "ops-v3" version = "0.0.1" -authors = [] +authors = ["OpenAPI Generator team and contributors"] description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" +# Override this license by providing a License Object in the OpenAPI. license = "Unlicense" edition = "2018" diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml index db285f1e634a..5f81fc4e2f9c 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "petstore-with-fake-endpoints-models-for-testing" version = "1.0.0" -authors = [] +authors = ["OpenAPI Generator team and contributors"] description = "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\" -license = "Unlicense" +license = "Apache-2.0" edition = "2018" publish = ["crates-io"] diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/Cargo.toml b/samples/server/petstore/rust-server/output/ping-bearer-auth/Cargo.toml index afddad336f4c..9b414550fb94 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/Cargo.toml +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "ping-bearer-auth" version = "1.0.0" -authors = [] +authors = ["OpenAPI Generator team and contributors"] description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" +# Override this license by providing a License Object in the OpenAPI. license = "Unlicense" edition = "2018" diff --git a/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml b/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml index 6e49c55ccf3d..e7cc32a08a0d 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml +++ b/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "rust-server-test" version = "2.3.4" -authors = [] +authors = ["OpenAPI Generator team and contributors"] description = "This spec is for testing rust-server-specific things" +# Override this license by providing a License Object in the OpenAPI. license = "Unlicense" edition = "2018"