Skip to content

Submitting Money input via HAL browser broken #63

@otrosien

Description

@otrosien

Hi Oliver,

I have to bug you again for the REST API of money values. Polishing of my pull request (specifically https://github.com/olivergierke/spring-restbucks/blob/master/src/main/java/org/springsource/restbucks/JacksonCustomizations.java#L188) introduces LocaleContextHolder.getLocale() to obtain a money parser for a given locale. This does not fit anymore with the other part of the code (lines 123 ff) where you provide a regular expression pattern for the money value.

E.g. given locale "de-DE", I am expected to provide a money value like this: "EUR 123,45", which is rejected by the input validation inside the HAL browser (taking the regex from json schema iirc). So either stick to a fixed locale (I was using Locale.US in my PR, and that matches your regex), or remove the regular expression validation.

If you want, I can provide a test case that reproduces the bug.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions