openapi-processor / openapi-processor-core

moved into openapi-processor-base
Apache License 2.0
7 stars 5 forks source link

marker interface for oneOf? #78

Closed hauner closed 2 years ago

hauner commented 3 years ago

Is it worth adding a marker interface to the items of oneOf that's used as the type instead of Object?

moved anyOf to #90, one step at a time

davidjohnstonverint commented 2 years ago

Yes please :D

davidjohnstonverint commented 2 years ago

Will the fields that reference the marker interface be given the @Valid annotation?

hauner commented 2 years ago

of course ;-)

hauner commented 2 years ago

you can try it with

io.openapiprocessor:openapi-processor-spring:2022.3-SNAPSHOT by enabling one-of-interface: true in the options.

openapi-processor-mapping: v2

options:
  bean-validation: true
  one-of-interface: true

with the gradle plugin it should find the snapshot automatically....

davidjohnstonverint commented 2 years ago

Works a treat, thank you.

hauner commented 2 years ago

nice :-)

hauner commented 2 years ago

released in io.openapiprocessor:openapi-processor-spring:2022.3