mbknor-jackson-jsonSchema icon indicating copy to clipboard operation
mbknor-jackson-jsonSchema copied to clipboard

Enum type being changed from integer to string

Open wmfowlkes opened this issue 5 years ago • 2 comments

I have a pojo with an enum with a value of type integer. The schema generator is converting this to a string. Any idea why this would be the case? This is causing schema validation to fail at run time because of the discrepancy.

wmfowlkes avatar May 19 '20 18:05 wmfowlkes

Can you show me some example POJO-/Enum-code and explain how you would expect the schema to look like?

mbknor avatar May 24 '20 12:05 mbknor

Hi @mbknor. Here's a minimal example for this issue. At least it shows how I'm encountering the issue. The unit test is the example would be expected to pass - based on the new functionality I'm hoping for - but it fails saying "string" is not equal to "integer"

https://github.com/msmsimondean/mbknor-jackson-jsonSchema-issue-123-example

msmsimondean avatar Aug 05 '21 07:08 msmsimondean