-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support boolean
additional_properties
in JSON schema helper o…
…bjects (#1188) * feat: Support boolean `additional_properties` in JSON schema helper objects * Add more test cases for `ObjectType` * Remove re-implementation of to_json * Re-add test case Co-authored-by: Cody J. Hanson <cody@meltano.com>
- Loading branch information
1 parent
9d6a48a
commit 747a202
Showing
6 changed files
with
304 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
tests/snapshots/jsonschema/duplicates_no_additional_properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"email": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"username": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"phone_number": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"email": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"username": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"phone_number": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |
33 changes: 33 additions & 0 deletions
33
tests/snapshots/jsonschema/required_duplicates_no_additional_properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"email": { | ||
"type": [ | ||
"string" | ||
] | ||
}, | ||
"username": { | ||
"type": [ | ||
"string" | ||
] | ||
}, | ||
"phone_number": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"email", | ||
"email", | ||
"username" | ||
], | ||
"additionalProperties": false | ||
} |
Oops, something went wrong.