|
What a title. I noticed today that we are sending data in our responses that is not described in the component spec. In the example schema I'll post below I have a |
Answered by
hkosova
Apr 25, 2022
Replies: 2 comments 2 replies
|
Your example is valid and is equivalent to this (YAML version for readability): Object:
required: [id, title, created_at]
type: object
properties:
id:
type: integer
title:
description: Title for the new object.
type: string
created_at: {} # The value can be of any typeExtra properties not explicitly defined under You can use a linter to enforce that the properties listed in the |
2 replies
Answer selected by
mull
|
This JSON Schema question was answered, closing. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your example is valid and is equivalent to this (YAML version for readability):
Extra properties not explicitly defined under
propertiesare allowed unless the schema hasadditionalProperties: false/unevaluatedProperties: false.You can use a linter to enforce that the properties listed in the
requiredlist are explicitly defined inproperties.