swagger-core
swagger-core copied to clipboard
Integer enum Schema parsing can fail based upon locale
Question
I am having issues in different OAS projects when they involve a specification that contains an integer enums with a negative values. The value is interpreted as null rather than the negative value.
I am using Swedish locale, so I assume that it is the same issue as https://github.com/swagger-api/swagger-core/issues/4223. Is it intended that the parsing should be locale dependent, or is it something that could be adjused? The issue author provided a suggested fix, but it seems it was not merged.
Affected Version
2.2.34
Context
An example of a schema that cannot be interpreted is show below.
schema:
type: integer
format: int32
enum:
- 1
- -2
Additional Details
Checklist
- [x] I have searched the existing issues and documentation before asking.
- [x] I have provided enough information for others to understand my question.