-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Usage Collection] [schema] Explicit "array" definition #78141
Changes from 4 commits
39a8515
5a67615
2044602
6c6e4b3
af5aa24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,10 @@ | |
"sample-data": { | ||
"properties": { | ||
"installed": { | ||
"type": "keyword" | ||
"type": "array", | ||
"items": { | ||
"type": "keyword" | ||
} | ||
}, | ||
"last_install_date": { | ||
"type": "date" | ||
|
@@ -44,7 +47,10 @@ | |
"type": "keyword" | ||
}, | ||
"uninstalled": { | ||
"type": "keyword" | ||
"type": "array", | ||
"items": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about renaming There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to follow similarities to the JSON-schema specification (even though we are not fully using that). I think But happy to change it if you think |
||
"type": "keyword" | ||
} | ||
} | ||
} | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why didnt we add
array
to theAllowedSchemaTypes
type here instead of using union?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I think TS would allow
{ type: 'array' }
for non-array fields and we'll only catch it when running the check.