We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust generator generates &str&str type for api call arguments when they are both type: string and format:uuid
&str&str
type: string
format:uuid
latest master
swagger: "2.0" info: version: API 1.0.0 title: StrStrBug basePath: /api paths: /api/v1/item/{id}: get: tags: - my-controller summary: Get Item by Id. operationId: getByIdUsingGET produces: - "*/*" parameters: - name: id in: path description: id required: true type: string format: uuid responses: "200": description: OK
java -jar openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ./swagger.yml -g rust --library hyper -o api
Expected output is
fn get_by_id_using_get(&self, id: &str) -> Box<dyn Future<Item = (), Error = Error<serde_json::Value>>> {
Actual output is
fn get_by_id_using_get(&self, id: &str&str) -> Box<dyn Future<Item = (), Error = Error<serde_json::Value>>> {
#10569
The text was updated successfully, but these errors were encountered:
Fixes #10568 (#10569)
efa032a
Do'not output &str for isString if it is also isUuid
Fixes #10568 (#12409)
50958e2
Successfully merging a pull request may close this issue.
Bug Report Checklist
Description
rust generator generates
&str&str
type for api call arguments when they are bothtype: string
andformat:uuid
openapi-generator version
latest master
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
java -jar openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ./swagger.yml -g rust --library hyper -o api
Expected output is
Actual output is
Related issues/PRs
Suggest a fix
#10569
The text was updated successfully, but these errors were encountered: