baloise / corellia

B2B-interface (Web-API) specification for (insurance) contract data
Apache License 2.0
5 stars 3 forks source link

Fix uppercase/lowercase issue with enum instantiation #51

Closed frank-baier closed 5 years ago

frank-baier commented 5 years ago

Expected Behavior

being able to provide lower or upper case String as enum values

Actual Behavior

Exception: com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not deserialize value of type ch.baloise.corellia.api.entities.Document$MediaType from String "application_pdf": value not one of declared Enum instance names: [IMAGE_GIF, IMAGE_BMP, APPLICATION_PDF, IMAGE_PNG, IMAGE_TIFF, IMAGE_JPEG] at [Source: ch.basler.common.service.camel.helper.ServletByteArrayInputStream@64cbf1ac; line: 3, column: 15] (through reference chain: ch.baloise.corellia.api.entities.Document["mediaType"])

Steps to Reproduce the Problem

use lowercase MediaType string in JSON-Request