-
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
[Cases] Update the custom fields api documentation. #169242
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
x-pack/plugins/cases/docs/openapi/components/schemas/custom_fields_configuration.yaml
Outdated
Show resolved
Hide resolved
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.
Thanks Antonio for updating the docs. I have some observations/questions (sorry for my lack of knowledge):
- Should we update the types for the create/update Case APIs?
- I think we should tell users how we treat optional fields when are missing from the create/update Case APIs?
- How I can visualize the changes in the docs?
nullable: true | ||
description: > | ||
The value of the custom field. Cannot be explicitly set to null if the field is configured as required. | ||
However, existing cases when the custom field was created will have this value null as default. |
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.
This is not entirely true because we do not persist the null
value in ES. Though our APIs will return null
. I am not sure if we have to be explicit about it. wdyt? cc @lcawl
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.
How about:
The value of the custom field. Cannot be explicitly set to null if the field is configured as required. However, cases that had been created before the custom field was added will have this value undefined
in elastic search and return null
as default when trying to access them via API or UI.
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.
Here's what I'm currently proposing in #169327:
The custom field value.
If the custom field is required, it cannot be explicitly set to null.
However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch isundefined
.
The value returned in the API and user interface in this case isnull
.
x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml
Show resolved
Hide resolved
That comes from
This is an explanation more about what the user doesn't send so where would that make sense? Maybe here?
@lcawl ? 😅 |
|
Looks like we were both working on this yesterday (my PR: #169327). I will compare to see if we can merge our efforts. |
💔 Build FailedFailed CI Steps
Test Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @adcoelho |
I removed the previews in #168761, so these specs must be viewed in external viewers for now. The first priority in our new docs site is displaying the serverless APIs, so these case APIs are not visible there yet. |
Summary
This PR updates the documentation with the custom fields logic that was implemented recently in the custom fields feature branch.