Skip to content

[FEATURE] Move ExtensionRestResponse class to same package as ExtensionRestRequest #165

@dbwiddis

Description

@dbwiddis

Is your feature request related to a problem?

As part of #163, the ExtensionRestRequest was moved to the OpenSearch project. It makes sense to also relocate the ExtensionRestResponse object there as well for Reasons:

  • Put the request and response together in the same package
  • Enable the header keys to be made public constants and easily read by the RestSendToExtensionAction rather than duplicating constants (code smell, error prone).

What solution would you like?

Move the class and its tests to org.opensearch.extensions.rest package.

What alternatives have you considered?

Leaving it as is and hoping nobody changes one of the constants without forgetting to change the other.

Do you have any additional context?

@peternied wants to rename some methods in the class per this comment, we can handle that at the same time:

This name is too literal and kind of tripping me up, what about breaking this functionality apart into something like markParameter(s)Consumed(String([]) param), markContentConsumed(), and finally record/reportConsumedItems()

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions