You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are many query parameters that are shared by several APIs. For these parameters, I think it's best to keep the description of the parameter in the common shared schema. For example, expand_wildcards is shared by several APIs, including several CAT APIs. Some of the CAT APIs define their own descriptions for this parameter, while the description should be part of the common schema.
For parameters that take enums (for example, the same expand_wildcards), the description should not contain the valid parameter values. Rather, these can be generated from the schema.
For reference, here's the common schema for expand_wildcards:
ExpandWildcards:
oneOf:
- $ref: '#/components/schemas/ExpandWildcard'
- type: array
items:
$ref: '#/components/schemas/ExpandWildcard'
ExpandWildcard:
oneOf:
- type: string
const: all
description: Match any index, including hidden ones.
- type: string
const: closed
...
This proposal is to make it as follows:
ExpandWildcards:
description: Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
oneOf:
- $ref: '#/components/schemas/ExpandWildcard'
- type: array
items:
$ref: '#/components/schemas/ExpandWildcard'
ExpandWildcard:
oneOf:
- type: string
const: all
description: Match any index, including hidden ones.
- type: string
const: closed
...
And remove descriptions from individual APIs like CAT indices:
cat.indices::query.expand_wildcards:
in: query
name: expand_wildcards
description: The type of index that wildcard patterns can match. Supported values are `all`, `open`, `closed`, `hidden`, and `none`.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards'
style: form
What problems are you trying to solve?
Improve maintainability of the spec
The text was updated successfully, but these errors were encountered:
What/Why
expand_wildcards
is shared by several APIs, including several CAT APIs. Some of the CAT APIs define their own descriptions for this parameter, while the description should be part of the common schema.expand_wildcards
), the description should not contain the valid parameter values. Rather, these can be generated from the schema.For reference, here's the common schema for
expand_wildcards
:This proposal is to make it as follows:
And remove descriptions from individual APIs like CAT indices:
What problems are you trying to solve?
Improve maintainability of the spec
The text was updated successfully, but these errors were encountered: