OpenAPITools / OpenAPITools/openapi-generator

[Announcement] How does open api generator handle api gateway url routing to different actual service endpoint

Open
#4,882 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Announcement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.