Skip to content

[FEATURE] Support Routes with named wildcards #122

@dbwiddis

Description

@dbwiddis

Is your feature request related to a problem?

In addition to forwarding the params, should we also be able to support routes with parameters?

i.e. new Route(POST, "/crud/update/{doc_id}")

Our current process for locating ExtensionRestHandlers looks for an exact match to the URI to find the respective handler (See https://github.com/opensearch-project/opensearch-sdk-java/blob/main/src/main/java/org/opensearch/sdk/ExtensionsRunner.java#L228).

Are route parameters functionality we want to support?

Originally posted by @cwperks in #111 (comment)

What solution would you like?

We need to change the matching in the ExtensionsRunner hashmap from exact, to parsing a request URI and allowing "wildcard" parameters.

What alternatives have you considered?

Java's path glob matching is probably a great fit here. I'll dig through Rest Handler code to see if that's how it's done there.

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