OpenAPITools / OpenAPITools/openapi-generator
[REQ] Separate request/response type conversion from server setup
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I'm using generated code, in particular from the rust-server generator, to create an API to be implemented for a FaaS runtime (eg. Lambda). The requests are going to be routed to functions by an API Gateway, so I don't need web server setup, but I would benefit from the code to convert between API request/response types into HTTP requests/responses.
Describe the solution you'd like
Generate the server code such that methods for converting HTTP requests into API requests and API responses into HTTP responses are exposed to the consumer.
In particular, for Rust, it would make sense if std::convert::TryInto or std::convert::TryFrom were implemented.
Describe alternatives you've considered
Using the entire handler code from the generated server in each lambda. This seems overcomplicated.
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the rust-server generator and its generated server handler. Trace how API Gateway requests become HTTP requests and how HTTP responses become API responses, then determine how those conversions can be exposed without requiring web-server setup. Done means generated Rust code provides reusable conversion methods for both directions while preserving the existing server behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100