Schema for object with number index
See original GitHub issueThe typescript type
interface MyType {
[index: number]: number
}
is parsed into the schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"items": {
"type": "number"
},
"type": "array"
}
while it should be parsed into
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"type": "number"
}
},
"additionalProperties": false
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
10 Schema Objects - Oracle Help Center
A schema is a collection of schema objects. Schema objects include tables, views, sequences, synonyms, indexes, clusters, database links, snapshots, procedures ...
Read more >How to define object in array in Mongoose schema correctly ...
For making an array in schema we have to make one more schema as ... blk_data is a transaction list (block number and...
Read more >Mongoose v6.8.1: SchemaTypes
You can think of a Mongoose schema as the configuration object for a Mongoose model. ... String; Number; Date; Buffer; Boolean; Mixed; ObjectId;...
Read more >List of objects with required values · Discussion #191 - GitHub
How do you define required values in a list? I have a list of objects with a property which is an enum with...
Read more >Add an Index to a Big Object - Salesforce Help
The index defines the composite primary key for a custom big object and is used for querying and filtering the big object data....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks incorrect to me. If we don’t have a test for it, probably no.
I’ve found the time to look into fixing this. I’ve added a pull request that fixes this