openapi-processor/openapi-processor-spring

mono/flux validation

hauner opened this issue · 1 comments

validation on Flux<Dto> only works with the @Valid at the Flux<> and not on the dto object.

i.e. it requires

@Valid Flux<Dto>

instead of

Flux<@Valid Dto>

a workaround for small request bodies may be to disable the flux ...

map:
  # enabling mono/flux 
  single: reactor.core.publisher.Mono
  multi: reactor.core.publisher.Flux

  types:
    - type: array => java.util.Collection
 
 # disable the flux 
  paths:
    /books:
      post:
        multi: plain