mbknor / mbknor-jackson-jsonSchema

Generate JSON Schema with Polymorphism using Jackson annotations
MIT License
235 stars 79 forks source link

Enum type being changed from integer to string #123

Open wmfowlkes opened 4 years ago

wmfowlkes commented 4 years ago

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.

mbknor commented 4 years ago

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

msmsimondean commented 3 years ago

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