diff --git a/bin/configs/rust-server-petstore-with-fake-endpoints-models-for-testing.yaml b/bin/configs/rust-server-petstore-with-fake-endpoints-models-for-testing.yaml index c0f47a60634..7e009c7d952 100644 --- a/bin/configs/rust-server-petstore-with-fake-endpoints-models-for-testing.yaml +++ b/bin/configs/rust-server-petstore-with-fake-endpoints-models-for-testing.yaml @@ -6,3 +6,4 @@ generateAliasAsModel: true additionalProperties: hideGenerationTimestamp: "true" packageName: petstore-with-fake-endpoints-models-for-testing + publishRustRegistry: crates-io 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 4c733fbafe4..a822a900193 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache @@ -7,6 +7,18 @@ description = "{{{appDescription}}}" {{/appDescription}} license = "Unlicense" edition = "2018" +{{#publishRustRegistry}} +publish = ["{{publishRustRegistry}}"] +{{/publishRustRegistry}} +{{#repositoryUrl}} +repository = "{{repositoryUrl}}" +{{/repositoryUrl}} +{{#documentationUrl}} +documentation = "{{documentationUrl}}" +{{/documentationUrl}} +{{#homePageUrl}} +homepage = "{{homePageUrl}} +{{/homePageUrl}} [features] default = ["client", "server"] 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 fb344637445..9c9a34f1aa4 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 @@ -5,6 +5,7 @@ authors = [] 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" edition = "2018" +publish = ["crates-io"] [features] default = ["client", "server"]