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
  • Issues
  • #1199
Closed
Open
Issue created Oct 08, 2018 by Administrator@rootContributor

[rust client] Feature: Generic requests–agnostic of transportation or tokio

Created by: colelawrence

Description

For my own application, I just finished updating the rust-client implementation from using hyper 0.11 to using hyper 0.12 (see diff of conversion)

I thought that I had to do this in order to be able to use the client generator with my generated rust-server, because all of the current examples are suited for hyper 0.12 or newer versions of tokio/futures.

openapi-generator version

3.1.0 accretion (no regression)

Suggest a fix/enhancement

This is where my idea comes in. I would like to be able to choose my own transport and not worry about conflicting threads or things like Send and Sync as a beginner. I would like to be able to leverage a client generator for constructing requests against the correct endpoint with the correct headers, but remove it's dependence on specific async runtimes.

I would like the ::apis::Request struct to implement a generic request which I could impl Into<hyper::Request> for event_service_http::apis::Request {} for whichever version of hyper, reqwest, actix-* http library the library is using.

We could enable hyper specific client using cargo features, I think.

What are your thoughts? @bjgill @euank @wing328

Assignee
Assign to
Time tracking