Closed podhmo closed 3 years ago
jsonschema (and openAPI), default value of additionalProperties is true. then
class S(Schema):
class Meta:
unknown = INCLUDE
default marshmallow's behavior is same as following
class S(Schema):
class Meta:
unknown = RAISE
This is additionalProperties is false
's behavior
If schema (openAPI) has not properties. We can use DictField.
definitions:
S:
addtionalProperties:
type: string
if schema has properties, special Schema class is needed (This is current AdditionalPropetiesSchema)
class S(AdditionalPropertiesSchema):
name = fields.String()
class Meta:
additional_field = fields.Integer()
And if top-level definition even no properties, special Schema class is needed. (this is same as type array, and type primitive value)
62
26