OpenAPITools / OpenAPITools/openapi-generator
[QUESTION] [C++] Need help on "type/format conversion in Yaml" for open-api-generator
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Hi ,
We have an yaml specified in the following way for a field.
field1:
type: string
format: uint64
So, the data for this field is coming as a string but need to be interpreted as uint64.
Is there any option in the open api generator which creates the classes with format instead of the type. Basically, even the fromJson routines, can they be able to do this conversion automatically and populate the corresponding data structures.
For ex: fromJson() should convert the received string format into uint64 format and populate the corresponding member in the C++ class.
Really appreciate any inputs on this.
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
The issue does not name a generator file, test, or entry point. Start by inspecting the C++ generator's fromJson routines and how they handle fields declared as string with format: uint64. Done would require a documented, tested decision on whether generated code should convert such values to uint64 automatically.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100