Add flag how to handle unknown enum values. #14

Closed
opened 2020-05-25 10:02:30 +02:00 by sschnabe · 2 comments
sschnabe commented 2020-05-25 10:02:30 +02:00 (Migrated from github.com)

Currently all unknown Enum values are rejected with IllegalArgumentException.

Add an config option enumHandling:

  • reject: throw IllegalArgumentException (default)
  • optional: method with JsonCreator returns optional
  • string: use string instead of enums
Currently all unknown Enum values are rejected with `IllegalArgumentException`. Add an config option **enumHandling**: * **reject**: throw `IllegalArgumentException` (default) * **optional**: method with `JsonCreator` returns optional * **string**: use string instead of enums
wistefan commented 2021-03-17 13:42:45 +01:00 (Migrated from github.com)

"Currently all unknown Enum values are rejected with IllegalArgumentException."
Thats not always the case. If you set the config to useReferencedSchemaAsDefault=true, a default enum will be created.

"Currently all unknown Enum values are rejected with IllegalArgumentException." Thats not always the case. If you set the config to useReferencedSchemaAsDefault=true, a default enum will be created.
sschnabe commented 2021-04-23 13:23:14 +02:00 (Migrated from github.com)

ok, closed.

ok, closed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
kokuwaio/micronaut-openapi-codegen#14
No description provided.