Replies: 1 comment 3 replies
-
I see this is closely related to https://github.com/orgs/tsedio/discussions/2781 and none of the proposed solutions (OneOf | Any | AnyOf) do work. But my question remains the same: is there a way to achieve this implicit additional properties removal instead of annotating classes with |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello 👋
I've stumbled upon a problem where if I have a list of possible models (stored on a parent's model property), they implicitly allow additional properties. And only way to prevent it is to use
@AdditionalProperties(false)
on all of the data model classes in the list.Here is the example class
where payload:
produces:
Is this expected? And my question would be, is there a way to annotate ExampleModel's modelList so it doesn't allow additional properties implicitly (the same way they get removed in the parent model)?
Beta Was this translation helpful? Give feedback.
All reactions