Skip to content

Updating Example Request with spec_insert tags#10546

Merged
kolchfa-aws merged 18 commits intoopensearch-project:mainfrom
ReveristRealm:tags
Sep 2, 2025
Merged

Updating Example Request with spec_insert tags#10546
kolchfa-aws merged 18 commits intoopensearch-project:mainfrom
ReveristRealm:tags

Conversation

@ReveristRealm
Copy link
Copy Markdown
Contributor

@ReveristRealm ReveristRealm commented Jul 31, 2025

Description

Updated example request with spec insert tags to display python conversions.

Example

Screenshot 2025-08-12 at 6 54 33 PM

Included Script with directions in DEVELOPER-GUIDE.MD

Screenshot 2025-08-15 at 1 10 45 PM

Issues Resolved

Closes #[delete this text, including the brackets, and replace with the issue number]

Version

List the OpenSearch version to which this PR applies, e.g. 2.14, 2.12--2.14, or all.

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.

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.

Daniel Jackson and others added 7 commits July 22, 2025 15:38
Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
…n of API calls into Language SDK.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
…n of API calls into Language SDK.

Refactored code base to make "api" tag optional for quicker tag placements

Examples:

<!-- spec_insert_start
component: example_code
rest: GET /_cat/allocation?v=true&format=json&bytes=mb
-->
<!-- spec_insert_end -->

<!-- spec_insert_start
component: example_code
rest: GET /users/_doc/42?_source=name,email
include_client_setup: T
-->

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
…rt' into Spec-Insert->HTTP-to-ProLang_Start
Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
@github-actions
Copy link
Copy Markdown

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.

## Query parameters

The following table lists the available query parameters. All query parameters are optional.
The following table lists the available query parameters.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ReveristRealm Why did the "All query parameters are optional." get deleted? It is important information.

@kolchfa-aws kolchfa-aws added the In progress Issue/PR: The issue or PR is in progress. label Aug 4, 2025
Daniel Jackson and others added 9 commits August 7, 2025 12:22
- Added test examples to test files.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
- Added more test examples to fixtures file.
  - Included test for NDJSON files.
  - Included test to showcase multi-line for body tag

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
- Changed "include_client_setup" to be called from "insert_arguments.rb" for scalability and clarity. Also changed it so that you have to state "true" or "false".

- Included "skip" tag. This is for when you come across a spec-insert that cant be converted to a client.You can do it manually, and it won't mess with future renders

- Allowed for the body tag to be in multiple lines instead of one.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
…rt' into Spec-Insert->HTTP-to-ProLang_Start
- Fixed minor query params issue.

- Implemented steps in the developer guide.

- Removed un-reachable code  logic.

- Included example with NDJSON body in test files.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
- Inserted tags on pages to display updated python conversions.

- Included script to insert tags with steps in the developer guide for proper use.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
@ReveristRealm ReveristRealm marked this pull request as ready for review August 15, 2025 20:11
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

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

LGTM

@kolchfa-aws kolchfa-aws merged commit 6f18ee6 into opensearch-project:main Sep 2, 2025
6 of 7 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 8, 2025
* Updating Spect Insert tool to support client code translations

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Continued working on the Spect Insert feature for automatic conversion of API calls into Language SDK.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Continued working on the Spect Insert feature for automatic conversion of API calls into Language SDK.

Refactored code base to make "api" tag optional for quicker tag placements

Examples:

<!-- spec_insert_start
component: example_code
rest: GET /_cat/allocation?v=true&format=json&bytes=mb
-->
<!-- spec_insert_end -->

<!-- spec_insert_start
component: example_code
rest: GET /users/_doc/42?_source=name,email
include_client_setup: T
-->

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Updating Example Request with spec_insert tags

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Continued working on the Spec-Insert tool.

- Added test examples to test files.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Continued working on the Spec-Insert tool.

- Added more test examples to fixtures file.
  - Included test for NDJSON files.
  - Included test to showcase multi-line for body tag

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Finished Python Client Code Conversion from HTTP w/ some minor tweaks.

- Changed "include_client_setup" to be called from "insert_arguments.rb" for scalability and clarity. Also changed it so that you have to state "true" or "false".

- Included "skip" tag. This is for when you come across a spec-insert that cant be converted to a client.You can do it manually, and it won't mess with future renders

- Allowed for the body tag to be in multiple lines instead of one.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Finished Python Client Code Conversion from HTTP w/ some minor tweaks.

- Fixed minor query params issue.

- Implemented steps in the developer guide.

- Removed un-reachable code  logic.

- Included example with NDJSON body in test files.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Finished Spec-Insert feature allowing for multi-language support.

- Inserted tags on pages to display updated python conversions.

- Included script to insert tags with steps in the developer guide for proper use.

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>

* Apply suggestions from code review

Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

---------

Signed-off-by: Daniel Jackson <imdanjac@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: Daniel Jackson <imdanjac@amazon.com>
Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
(cherry picked from commit 6f18ee6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 3.2 In progress Issue/PR: The issue or PR is in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants