Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !5871

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

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/paladinzh/feature/june/5.0.x_0405 into 5.0.x Apr 09, 2020
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 27

Created by: paladinzh

https://github.com/OpenAPITools/openapi-generator/issues/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

  • @frol
  • @farcaller
  • @bjgill

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.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/paladinzh/feature/june/5.0.x_0405