Java Micronaut codegen: how to incorporate OpenAPI v3.x relative URLs for endpoint path generation?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading the referenced MicronautCodegen.java implementation and the Java mustache templates to trace how endpoint paths are assembled. Use the sample OpenAPI specification with servers.url or basePath as the reproduction case, then verify that generated endpoints include /v1 before /users.
Written by the indexing model from the issue text.
Description
Consider an OpenAPI yaml spec file with this definition:
openapi: "3.0.2"
info:
title: Some title
description: Some description
version: 0.0.1
contact:
name: Some name
url: http://www.example.com
email: [email protected]
servers:
- url: /v1/
paths:
/users:
get:
operationId: getUsers
I've also tried setting basePath instead:
openapi: "3.0.2"
info:
title: Some title
description: Some description
version: 0.0.1
contact:
name: Some name
url: http://www.example.com
email: [email protected]
servers:
- url: http://localhost:8080
basePath: /v1
paths:
/users:
get:
operationId: getUsers
I would have expected that the endpoint path generated is /v1/users, but instead it's just /users.
Is there a way to incorporate this path into my endpoints? Either by subclassing MicronautCodegen, or maybe by editing my mustache templates?
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from swagger-api/swagger-codegen-generators
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
[Bug]: Python/pythonFlaskConnexion generators validate map keys instead of values for additionalProperties.enumPossibly taken @pvillard31 claimed this 208 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Python generated code: Delete API Requests can be blocked in API Gateways when sends empty bodyOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Bug]: Bean validation doesn't work for numbers larger than Integer.MAX_VALUEPossibly taken @apupier claimed this 296 days ago. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
swagger-api/swagger-codegen-generators#1370 · 3 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
All issues in swagger-api/swagger-codegen-generators
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ROCm/rocm-libraries#15665 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
shadps4-emu/shadPS4#5705 ·
Maintainers usually reply within 1 day
-
bug multiple issues priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
storytold/gridcraft#3928 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Qiskit/qiskit-aer#2533 ·
Maintainers usually reply within 1 day