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 c0f47a60634fa1e4ddbc11039b69816dd248a2cf..7e009c7d952939b65aa5e58c967931ac8b27dec5 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 4c733fbafe4ade3c2b944c54a65d5003a9cf6f54..a822a90019394044f477092087173e36a457c354 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 fb344637445635ce2994f71ec5d8bce4a611b3c7..9c9a34f1aa4029b385d426c68ac58c202e27686f 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"]