beckn / beckn/protocol-specifications-v2

Regarding additionalProperties field in objects

Open
#143 1 comment 0 reactions 1 assignee Claimed by @ravi-prakash-v View on GitHub
schema-design v2
Dominant language
No language data
Stars
15
Forks
13
PR merge metrics
No merged PRs in 30d

Description

In Json Schema, by default additional properties are allowed in an object. Unless we specifically say additionalProperties:false, they are allowed. Compared to v1 of the protocol(1 instance), v2 has enforced no more additionalProperties by setting additionalProperties:false in over 35 objects. v2 also has specifically set additionalProperties:true in cases where we explicitly expect additional properties (particularly Attributes object, which are the core extension mechanism in v2).

However there are still certain objects where we have not specified additionalProperties field, resulting in the default behavior of additionalProperties:true. My question is, was this done by error, or by intent. If it is by intent, wouldn't it be better to specify so. Some of these are important objects such as Context, Resource, Offer etc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.