Skip to content

Return consumed params and content from extensions#169

Merged
dbwiddis merged 7 commits intoopensearch-project:mainfrom
dbwiddis:response
Oct 10, 2022
Merged

Return consumed params and content from extensions#169
dbwiddis merged 7 commits intoopensearch-project:mainfrom
dbwiddis:response

Conversation

@dbwiddis
Copy link
Copy Markdown
Member

@dbwiddis dbwiddis commented Oct 7, 2022

Companion PR: opensearch-project/OpenSearch#4705

Note: Gradle check will fail on this repo until the companion PR is merged due to these changes. Passes locally if companion PR changes are published locally.

Description

Moves the ExtensionRestResponse class from the SDK to o.o.extensions.rest.

  • Updates the class to store the consumed parameters and content as fields
  • Updates the ExtensionRestRequestHandler to copy the new fields
  • To demo content, added POST and DELETE methods to the Hello World sample and updated openapi spec
  • Updated tests for the new methods
  • Fixed a few bugs I found along the way

Issues Resolved

Fixes #165

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

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
@dbwiddis dbwiddis requested a review from a team October 7, 2022 06:29
@dbwiddis dbwiddis changed the title Response Return consumed params and content from extensions Oct 7, 2022
@dbwiddis dbwiddis requested review from ryanbogan and vibrantvarun and removed request for peternied October 7, 2022 18:06
Copy link
Copy Markdown
Member

@joshpalis joshpalis left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@owaiskazi19 owaiskazi19 left a comment

Choose a reason for hiding this comment

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

One minor comment

@dbwiddis dbwiddis merged commit 43d9cab into opensearch-project:main Oct 10, 2022
@dbwiddis dbwiddis deleted the response branch October 10, 2022 22:19
owaiskazi19 pushed a commit that referenced this pull request Oct 12, 2022
* Remove duplicate copies of registries in handlers

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Move ExtensionRestResponse to OpenSearch

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a POST request to parse content

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a DELETE request corresponding to the POST

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add consumed params and content to Extension Responses

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Update tests and OpenAPI spec

Signed-off-by: Daniel Widdis <widdis@gmail.com>

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
dbwiddis added a commit that referenced this pull request Oct 12, 2022
* Remove duplicate copies of registries in handlers

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Move ExtensionRestResponse to OpenSearch

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a POST request to parse content

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a DELETE request corresponding to the POST

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add consumed params and content to Extension Responses

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Update tests and OpenAPI spec

Signed-off-by: Daniel Widdis <widdis@gmail.com>

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
dbwiddis added a commit that referenced this pull request Oct 12, 2022
* Remove duplicate copies of registries in handlers

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Move ExtensionRestResponse to OpenSearch

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a POST request to parse content

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a DELETE request corresponding to the POST

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add consumed params and content to Extension Responses

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Update tests and OpenAPI spec

Signed-off-by: Daniel Widdis <widdis@gmail.com>

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@dbwiddis dbwiddis restored the response branch October 12, 2022 01:12
@dbwiddis dbwiddis deleted the response branch October 12, 2022 01:27
dbwiddis added a commit that referenced this pull request Oct 12, 2022
* Added createComponent to Extension interface and created BaseExtension abstract class

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Fixed minor error

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Changed create component arguments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Addressed PR Comments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Fixed minor errors

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Return consumed params and content from extensions (#169)

* Remove duplicate copies of registries in handlers

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Move ExtensionRestResponse to OpenSearch

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a POST request to parse content

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a DELETE request corresponding to the POST

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add consumed params and content to Extension Responses

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Update tests and OpenAPI spec

Signed-off-by: Daniel Widdis <widdis@gmail.com>

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Fixed minor errors

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Addressed PR Comments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Co-authored-by: Daniel Widdis <widdis@gmail.com>
kokibas pushed a commit to kokibas/opensearch-sdk-java that referenced this pull request Mar 17, 2023
* Added createComponent to Extension interface and created BaseExtension abstract class

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Fixed minor error

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Changed create component arguments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Addressed PR Comments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Fixed minor errors

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Return consumed params and content from extensions (opensearch-project#169)

* Remove duplicate copies of registries in handlers

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Move ExtensionRestResponse to OpenSearch

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a POST request to parse content

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a DELETE request corresponding to the POST

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add consumed params and content to Extension Responses

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Update tests and OpenAPI spec

Signed-off-by: Daniel Widdis <widdis@gmail.com>

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Fixed minor errors

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Addressed PR Comments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Co-authored-by: Daniel Widdis <widdis@gmail.com>
caokyhieu pushed a commit to caokyhieu/opensearch-sdk-java that referenced this pull request Aug 15, 2025
* Added createComponent to Extension interface and created BaseExtension abstract class

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Fixed minor error

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Changed create component arguments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Addressed PR Comments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Fixed minor errors

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Return consumed params and content from extensions (opensearch-project#169)

* Remove duplicate copies of registries in handlers

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Move ExtensionRestResponse to OpenSearch

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a POST request to parse content

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add a DELETE request corresponding to the POST

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add consumed params and content to Extension Responses

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Update tests and OpenAPI spec

Signed-off-by: Daniel Widdis <widdis@gmail.com>

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Fixed minor errors

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Addressed PR Comments

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Co-authored-by: Daniel Widdis <widdis@gmail.com>
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.

[FEATURE] Move ExtensionRestResponse class to same package as ExtensionRestRequest

3 participants