Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

marker interface for oneOf? #78

Closed
hauner opened this issue Aug 29, 2021 · 7 comments
Closed

marker interface for oneOf? #78

hauner opened this issue Aug 29, 2021 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@hauner
Copy link
Member

hauner commented Aug 29, 2021

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

@hauner hauner added the enhancement New feature or request label Aug 29, 2021
@davidjohnstonverint
Copy link

Yes please :D

hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
hauner added a commit that referenced this issue Apr 9, 2022
@hauner hauner added this to the 2022.3 milestone Apr 9, 2022
@hauner hauner changed the title marker interface for oneOf/anyOf ? marker interface for oneOf? Apr 9, 2022
@davidjohnstonverint
Copy link

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

@hauner
Copy link
Member Author

hauner commented Apr 11, 2022

of course ;-)

@hauner
Copy link
Member Author

hauner commented Apr 12, 2022

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
Copy link

Works a treat, thank you.

@hauner
Copy link
Member Author

hauner commented Apr 12, 2022

nice :-)

@hauner hauner closed this as completed Apr 12, 2022
@hauner
Copy link
Member Author

hauner commented Apr 19, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants