OpenAPITools / OpenAPITools/openapi-generator
[Announcement] How does open api generator handle api gateway url routing to different actual service endpoint
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
let's say I'm using spring cloud gateway which is routing url /api/v1/foo to the actual service endpoint /api/what/the/heck hold by springboot, obviously I need to have path set to /api/v1/foo in the swagger yaml file because this is what is exposing to the user, but that would end in having the generated interface code with @RequestMapping(value="/api/v1/foo") rather than @RequestMapping(value="/api/what/the/heck"), don't ask me why I need to to the route, it's just as it is. What's the standard mechanism to handle this issue?
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 reviewing how the OpenAPI path /api/v1/foo is used for generated Spring request mappings, then compare that with the Spring Cloud Gateway route and Spring Boot service endpoint described here. A complete result would establish whether a standard mechanism exists for separating the exposed gateway path from the generated backend mapping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100