-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Reporting integer as number causes issues in client generators and invalid according to specification
Assemblies affected
Microsoft.OpenApi.OData.Reader 1.0.9
Steps to reproduce
Generate a specification.
Expected result
Integer numbers should be exposed as integer/int32
Actual result
Integer numbers will be exposed as number/int32
Additional detail
According to specification number/int32 is invalid.
Caused by commit 95058a2
This causes warning in openapi-generator and causes all integers to become doubles in NSwag
P.S.
Ah I see what happened. Looks like there's an additional registry https://spec.openapis.org/registry/format/. These formats can be in the wild but are not in the specification at all.
Therefore openapi-generator
and NSwag
doesn't support it.
But I think this library should be as close to specification as possible and use integer/int32
(exists in the spec) instead of number/int32
(doesn't exist in the spec but exists in optional registry)
Similar issue for #RicoSutter/NSwag/2880