[BUG] [Rust Server] Generated Rust code with yaml path parameter compile error.
Created by: paladinzh
Bug Report Checklist
- [ Y ] Have you provided a full/minimal spec to reproduce the issue?
- [ Y ] Have you validated the input using an OpenAPI validator (example)?
-
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
Using the following yaml file with path parameter and multi tag, generated Rust code compile error.
//modules/openapi-generator/src/test/resources/3_0/rust-server/openapi-v3.yaml @@ -359,6 +359,24 @@ paths: '200': description: Success
- /repos/{repoId}:
- parameters:
-
- in: path -
name: repoId -
schema: -
type: string -
required: true - get:
-
tags: [Repo, Info] -
operationId: GetRepoInfo -
responses: -
"200": -
description: OK -
content: -
application/json: -
schema: -
$ref: "#/components/schemas/StringObject"
- help: use
dyn:dyn Future<Item=CallbackWithHeaderPostResponse, Error=ApiError> + Senderror: trait objects without an explicitdynare deprecated --> output/openapi-v3/examples/server/server.rs:137:29 | 137 | context: &C) -> Box<Future<Item=CallbackWithHeaderPostResponse, Error=ApiError> + Send> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: usedyn:dyn Future<Item=CallbackWithHeaderPostResponse, Error=ApiError> + Send| = note:-D bare-trait-objectsimplied by-D warnings
error: trait objects without an explicit dyn are deprecated
--> output/openapi-v3/examples/server/server.rs:147:29
|
147 | context: &C) -> Box<Future<Item=ComplexQueryParamGetResponse, Error=ApiError> + Send>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use dyn: dyn Future<Item=ComplexQueryParamGetResponse, Error=ApiError> + Send
-
Generate Rust code "repoId" isue, Not "Repoid", and compile error. regex::Regex::new(r"^/v2/repos/(?P[^/?#]*)$")
-
multi tag will generate multi method.