swagger-api / swagger-api/swagger-codegen
[JAVA] - Consider regex for path params (subresource operation)
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I'm trying to generate resource endpoints which contain some sort of regex to validate the path params. Fox example: @Path(/resource/{res:[a-zA-z]})
Couldn't find a way to produce that kind of souce code. Does anyone know if this feature is already implemented?
Swagger-codegen version
2.2.2
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 tracing how the Java server generator turns OpenAPI path parameters into @Path declarations and identify the relevant templates or entry points. Confirm whether regex constraints are represented in the input specification and determine the generated syntax needed for a constrained path parameter. Done means Java output preserves the requested regex in the generated resource endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100