-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct schema for mapped object with other keys (#567)
* allow-extra-props-where-pattern-properties-not-empty * object mapped and other keys * docs * remove unnecessary changes * remove unnecessary changes 2 * remove unnecessary changes 3 * remove unnecessary changes 4 * fix auto test * fix comment * 0.60.0 * Back to 0.59.0 --------- Co-authored-by: netanel-mce <[email protected]>
- Loading branch information
1 parent
3662786
commit f38327e
Showing
5 changed files
with
48 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
interface NumericKeysAndOthers { | ||
[key: number]: number; | ||
a: string; | ||
b: boolean; | ||
} |
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,22 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"additionalProperties": false, | ||
"patternProperties": { | ||
"^[0-9]+$": { | ||
"type": "number" | ||
} | ||
}, | ||
"properties": { | ||
"a": { | ||
"type": "string" | ||
}, | ||
"b": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"required": [ | ||
"a", | ||
"b" | ||
], | ||
"type": "object" | ||
} |
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