OpenAPITools / OpenAPITools/openapi-generator
[BUG] multipleOf-Property not supported by codegens
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
I have an object that uses multipleOf-Property on numbers (same workaround as described in https://github.com/OAI/OpenAPI-Specification/issues/602), but there seems to be no way to use mustache templates for customization, because the current templating process does not respect the multipleOf-Property in anyway.
openapi-generator version
I used OpenAPI generator v3.3.2 +
OpenAPI declaration file content or url
amount:
type: number
multipleOf: 0.01
Suggest a fix
Making multipleOf-Hook available for templating. (helpful e.g. for creating Custom Constraints/Bean Validation in Java)
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
No source file or test is named in the report. Start by tracing how the OpenAPI declaration’s multipleOf value is handled by the templating process and code generators; done means exposing a multipleOf hook usable by mustache templates, including the Java custom-constraint use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100