Vogen
Vogen copied to clipboard
C# short/ushort type should map to OpenAPI integer (int32) instead of number
Description
Currently, in the OpenAPI schema generated by Vogen, the C# short type is being mapped incorrectly. According to OpenAPI and JSON Schema conventions, short should map to:
- OpenAPI type:
int32
Additionally, it is advisable to add length restrictions, for example:
- Minimum: -32768
- Maximum: 32767
Instead, it is currently being mapped as a generic number without specifying the format. The number type is intended in the OpenAPI for floating point numbers
References
Here are sources confirming this mapping:
Steps to reproduce
Link of mapping to open api type
Expected behaviour
C# short type should be mapped as:
{
"type": "int32",
"minimum": -32768,
"maximum": 32767
}
Similar for ushort.
I can make a PR with changes on this issue