[
https://issues.apache.org/jira/browse/CAMEL-18829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tomohisa Igarashi updated CAMEL-18829:
--------------------------------------
Description:
JSON schema requires `additionalProperties: false` to be specified to prohibit
additional properties those are not explicitly defined in `properties`
https://json-schema.org/understanding-json-schema/reference/object.html#additional-properties
And it doesn't propagate to the children, i.e. `additionalProperties: false`
needs to be specified on each object definition.
Since camel-yaml-dsl/generate-yaml-schema mojo doesn't add this property at
this moment, the generated schema doesn't really restrict properties. We want
to add an option 'additionalProperties" on generate-yaml-schema mojo, and if
it's set false, add `additionalProperties: false` on each objects in generated
schema so that it declares explicit restriction. The option should be `true` by
default so that it doesn't add anything in order to preserve current behavior.
was:
JSON schema requires `additionalProperties: false` to be specified to prohibit
additional properties those are not explicitly defined in `properties`
https://json-schema.org/understanding-json-schema/reference/object.html#additional-properties
And it doesn't propagate to the children, i.e. `additionalProperties: false`
needs to be specified in each object definition.
Since camel-yaml-dsl/generate-yaml-schema mojo doesn't add this property at
this moment, the generated schema doesn't really restrict properties. We want
to add an option 'additionalProperties" on generate-yaml-schema mojo, and if
it's set false, add `additionalProperties: false` on each objects in generated
schema so that it declares explicit restriction. The option should be `true` by
default so that it doesn't add anything in order to preserve current behavior.
> camel-yaml-dsl - generate-yaml-schema - Support `additionalProperties: false`
> -----------------------------------------------------------------------------
>
> Key: CAMEL-18829
> URL: https://issues.apache.org/jira/browse/CAMEL-18829
> Project: Camel
> Issue Type: Task
> Components: camel-yaml-dsl
> Reporter: Tomohisa Igarashi
> Assignee: Tomohisa Igarashi
> Priority: Minor
> Fix For: 3.20.0
>
>
> JSON schema requires `additionalProperties: false` to be specified to
> prohibit additional properties those are not explicitly defined in
> `properties`
> https://json-schema.org/understanding-json-schema/reference/object.html#additional-properties
> And it doesn't propagate to the children, i.e. `additionalProperties: false`
> needs to be specified on each object definition.
> Since camel-yaml-dsl/generate-yaml-schema mojo doesn't add this property at
> this moment, the generated schema doesn't really restrict properties. We want
> to add an option 'additionalProperties" on generate-yaml-schema mojo, and if
> it's set false, add `additionalProperties: false` on each objects in
> generated schema so that it declares explicit restriction. The option should
> be `true` by default so that it doesn't add anything in order to preserve
> current behavior.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)