Closed yuranos closed 6 years ago
Hi @yuranos
So, you're sending complex object (SiteKey) as a request parameter? How does that look like?
@Valid annotation is added when object is submitted through request body. So, in your example that will be something like:
post:
description: Get the booking details with `bookingRef = {bookingRef}`
body:
application/json:
type: SiteKey
@stojsavljevic , Spring MVC just flattens it into a list of query params and does serialisation/deserialisation into a bean out of the box. I will check it and try to create a PR today.
I understand that Spring is able to map query params to a pojo. My point was that submitting object through query parms is not most logical thing to do. But I assume in some cases it might be useful. So lets proceed with your PR. Thanks!
If I have a raml like:
A controller will not add @Valid to SiteKey method argument.