-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Use io-ts
's strict
utility type to ignore excess fields
#156156
Labels
Feature:Cases
Cases feature
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Comments
30 tasks
cnasikas
changed the title
Use
Use Apr 28, 2023
io-ts
's strict
utility type to ignore excess fields (@js-jankisalvi)io-ts
's strict
utility type to ignore excess fields
cnasikas
added
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Feature:Cases
Cases feature
labels
Apr 28, 2023
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
For most things we should be able to use |
@jonathan-buttner Does |
Actually sorry I have it wrong. We want
|
2 tasks
jonathan-buttner
added a commit
that referenced
this issue
May 24, 2023
## Summary This PR fixes #156156 It uses` io-ts strict` type to remove unnecessary attributes. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co> Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Cases
Cases feature
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
In Cases, we use a custom function called
excess
(io-ts
) to throw an error when a request contains excess fields. In the Serverless world where different nodes can be on different versions (thus with different data schemas), we cannot throw errors as it will break Cases.io-ts
supports thestrict
type where it omits unsupported fields by default. We should use this type.The text was updated successfully, but these errors were encountered: