Skip to content
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

[DOCS] Add examples to API endpoints #2482

Open
12 of 58 tasks
szabosteve opened this issue Apr 4, 2024 · 2 comments
Open
12 of 58 tasks

[DOCS] Add examples to API endpoints #2482

szabosteve opened this issue Apr 4, 2024 · 2 comments
Assignees

Comments

@szabosteve
Copy link
Contributor

szabosteve commented Apr 4, 2024

Description

Add examples to the API endpoints.

  • Use JSON format. Example PR: Add machine learning API examples #2452
  • To prevent duplicated work, leave your name beside a namespace/API you start working on.
  • The list contains only the API namespaces (for example, indices), you can expand the list granularly by adding the endpoints related to the namespace you work on in case it helps track the effort (for example, if you don't cover the whole namespace in one PR).
  • Add your PR URL next to the related namespace/API.
  • Adjust the list if you find any missing namespaces/endpoints.
  • Leave relevant notes either in the list or in a comment.

NOTE: Until there's an automated method for associating examples with endpoints, we're accomplishing it via overlays. Reach out to @lcawl if assistance is required.

API namespace inventory:

@lcawl
Copy link
Contributor

lcawl commented Jul 31, 2024

In case it's useful to other folks wanting a small (temporary) preview document, https://docs.bump.sh/guides/openapi/augmenting-generated-openapi/ mentions https://github.com/Mermade/openapi-filter/, and I was able to use it to strip out smaller subsets of the document. For example, to pull out only the operations that have the tag "transform.put_transform"):

npm install --global openapi-filter
make overlay-docs
openapi-filter -i --flags transform.put_transform --checkTags --info --valid -- output/openapi/elasticsearch-serverless-openapi.new.json output/openapi/filtered.json
bump preview output/openapi/filtered.json

@szabosteve
Copy link
Contributor Author

Related PR that simplifies the folder structure: #2779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants