Skip to content

Integer enum Schema parsing can fail based upon locale #4939

@Mattias-Sehlstedt

Description

@Mattias-Sehlstedt

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 #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

  • I have searched the existing issues and documentation before asking.
  • I have provided enough information for others to understand my question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions