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()
Is your feature request related to a problem?
As part of #163, the
ExtensionRestRequestwas moved to the OpenSearch project. It makes sense to also relocate theExtensionRestResponseobject there as well for Reasons:RestSendToExtensionActionrather than duplicating constants (code smell, error prone).What solution would you like?
Move the class and its tests to
org.opensearch.extensions.restpackage.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: