Skip to content

[Rust Server] Fix #5906 (yaml with path parameter error) #5871

New issue

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

Merged
merged 3 commits into from
Apr 15, 2020

Conversation

paladinzh
Copy link
Contributor

@paladinzh paladinzh commented Apr 9, 2020

#5906

Modification list

  1. Fix generated code with Rust 1.39+ issue
help: use dyn: dyn Future<Item=CallbackWithHeaderPostResponse, Error=ApiError> + Send
error: trait objects without an explicit dyn are deprecated
--> output/openapi-v3/examples/server/server.rs:137:29
|
137 | context: &C) -> Box<Future<Item=CallbackWithHeaderPostResponse, Error=ApiError> + Send>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use dyn: dyn Future<Item=CallbackWithHeaderPostResponse, Error=ApiError> + Send
|
= note: -D bare-trait-objects implied 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
  1. Generate Rust code "repoId", Not "Repoid", and compile error.
    regex::Regex::new(r"^/v2/repos/(?P[^/?#]*)$")

  2. Modify default serverPort from 80 to var "serverPort" with 8080, 8080 is more easy for test.

Rust Server Technical Committee

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.

@paladinzh paladinzh force-pushed the feature/june/5.0.x_0405 branch 3 times, most recently from f2b2fe5 to 142293b Compare April 10, 2020 02:46
@paladinzh paladinzh changed the title Feature/june/5.0.x 0405 BugFix #5887 Apr 10, 2020
Copy link
Contributor

@richardwhiuk richardwhiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - but can you clarify what bug you are fix by changing the regex?

@paladinzh paladinzh force-pushed the feature/june/5.0.x_0405 branch 4 times, most recently from eb2a5c7 to 898540f Compare April 13, 2020 09:13
@paladinzh paladinzh changed the title BugFix #5887 BugFix #5906 (yaml with path parameter and multi tag will compile error) Apr 13, 2020
@paladinzh paladinzh requested a review from richardwhiuk April 13, 2020 09:18
@paladinzh paladinzh force-pushed the feature/june/5.0.x_0405 branch from 898540f to a3e32f2 Compare April 13, 2020 12:38
@paladinzh paladinzh changed the title BugFix #5906 (yaml with path parameter and multi tag will compile error) BugFix (yaml with path parameter and multi tag will compile error) #5906 Apr 13, 2020
@paladinzh paladinzh changed the title BugFix (yaml with path parameter and multi tag will compile error) #5906 BugFix #5906 (yaml with path parameter and multi tag will compile error) Apr 13, 2020
@paladinzh
Copy link
Contributor Author

Looks good - but can you clarify what bug you are fix by changing the regex?
See #5906

@paladinzh paladinzh force-pushed the feature/june/5.0.x_0405 branch from a3e32f2 to 1321d4d Compare April 13, 2020 14:43
@paladinzh paladinzh changed the title BugFix #5906 (yaml with path parameter and multi tag will compile error) BugFix #5906 (yaml with path parameter error) Apr 13, 2020
@richardwhiuk richardwhiuk changed the title BugFix #5906 (yaml with path parameter error) [Rust Server] Fix #5906 (yaml with path parameter error) Apr 15, 2020
@richardwhiuk richardwhiuk merged commit c3837ca into OpenAPITools:5.0.x Apr 15, 2020
@richardwhiuk richardwhiuk added this to the 5.0.0 milestone Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants