Skip to content

Conversation

@nhtruong
Copy link
Contributor

@nhtruong nhtruong commented Mar 10, 2025

This PR also includes refactoring of older components

Request and Response Body Tables [Beta Version]

Note that this is just a preview version to collect feedback on the language and layout of these components. There are also edge-cases yet to be handled (So, not all APIs will be rendered correctly for these new components). There will be follow-up PRs to address the feedback and the edge-cases.

Initial render:

Screenshot 2025-03-10 at 3 13 02 PM

After expanding a collapsible panel:

Screenshot 2025-03-10 at 3 13 51 PM

Utilization Coverage Report

I've also added a tool to generate a utilization report (in markdown) for spec-insert components. This will help us see which components of which APIs still need to be replaced by those generated from the spec. Check the new DEVELOPER_GUIDE.md on how to generate this report.

Initial render:

Screenshot 2025-03-10 at 3 11 06 PM

After expanding a component and a namespace:

Screenshot 2025-03-10 at 3 11 52 PM

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@nhtruong nhtruong changed the title [Spec-Insert] Request and Response Body Tables [Beta Version] + Utilization Coverage [Spec-Insert] Request and Response Body Tables [Beta] + Utilization Coverage Mar 10, 2025
@nhtruong nhtruong mentioned this pull request Mar 13, 2025
1 task
@nhtruong
Copy link
Contributor Author

@Naarcha-AWS seems like that last commit failed the DCO check.

@Naarcha-AWS
Copy link
Contributor

@nhtruong: Should be fixed now.

Signed-off-by: Theo Truong <[email protected]>

The index settings to be updated.

The request body is __required__. It is a JSON object with the following fields.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are request bodies always JSON objects? If not, do we need to call this out or can we switch it to what's in the template:

"The following table lists the available request body fields. The request body is required".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a JSON object 90% of the time but an NDJSON (array of Jsons) the other time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can change the description to this then:

"The request body is a JSON object and is required. The following table lists the available request body fields."

Thoughts?

@Naarcha-AWS Naarcha-AWS merged commit 6715dc6 into opensearch-project:main Mar 21, 2025
6 checks passed
@nhtruong nhtruong deleted the phase-2 branch March 21, 2025 15:25
epugh pushed a commit to o19s/documentation-website that referenced this pull request Jul 2, 2025
…overage (opensearch-project#9385)

* [Spec-Insert] Phase 2: Request and Response Body Tables

Signed-off-by: Theo Truong <[email protected]>

* # Rubocop'ed

Signed-off-by: Theo Truong <[email protected]>

* Update spec-insert/spec/_fixtures/expected_output/body_params_tables.md

Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: Theo N. Truong <[email protected]>

* Update spec-insert/lib/renderers/body_parameters.rb

Signed-off-by: Naarcha-AWS <[email protected]>

* Update body_params_tables.md

* Update body_params_tables.md

* Fix one more request body missed in expected output

---------

Signed-off-by: Theo Truong <[email protected]>
Signed-off-by: Theo N. Truong <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: Eric Pugh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants