-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
🚀 Feature Proposal
Descriptions in the specification should have the following format:
- A one-line summary of the endpoint, without markup. Example: "Convert an index alias to a data stream."
- An empty line (is that necessary?)
- A description, using GitHub Flavored Markdown
Motivation
The motivation is that OpenAPI that distinguishes between summary and description. Today, we try to split on the first sentence (see #2608 and #2717), but having the source format correct will avoid using heuristics and will make sure we only use Markdown in the description.
The goal is not to migrate everything now, but document the ideal format for us.
Example
/**
* Convert an index alias to a data stream.
*
* Converts an index alias to a data stream.
* You must have a matching index template that is data stream enabled.
* The alias must meet the following criteria:\n
* - The alias must have a write index.\n
* - All indices for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos` field type.\n
* - The alias must not have any filters.\n
* - The alias must not use custom routing.\n\n
* If successful, the request removes the alias and creates a data stream with the same name.
* The indices for the alias become hidden backing indices for the stream.
* The write index for the alias becomes the write index for the stream.
*/
If we agree, I'll open a pull request to document this in https://github.com/elastic/elasticsearch-specification/blob/main/docs/doc-comments-guide.md.