From f64c8907819aa9af0654a60089d713da53ee73c6 Mon Sep 17 00:00:00 2001 From: dblock Date: Fri, 22 Nov 2024 13:49:48 -0500 Subject: [PATCH] Add sort parameter to /_ingest/processor/grok. Signed-off-by: dblock --- spec/namespaces/ingest.yaml | 10 +++++++++- tests/default/ingest/processor/grok.yaml | 16 ++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 tests/default/ingest/processor/grok.yaml diff --git a/spec/namespaces/ingest.yaml b/spec/namespaces/ingest.yaml index ed6f3c380..4c5bed58f 100644 --- a/spec/namespaces/ingest.yaml +++ b/spec/namespaces/ingest.yaml @@ -133,7 +133,8 @@ paths: description: Returns a list of the built-in patterns. externalDocs: url: https://opensearch.org/docs/latest - parameters: [] + parameters: + - $ref: '#/components/parameters/ingest.processor_grok::query.s' responses: '200': $ref: '#/components/responses/ingest.processor_grok@200' @@ -340,3 +341,10 @@ components: type: boolean default: false style: form + ingest.processor_grok::query.s: + name: s + in: query + description: Sort returned patterns by key name. + schema: + type: boolean + default: false diff --git a/tests/default/ingest/processor/grok.yaml b/tests/default/ingest/processor/grok.yaml new file mode 100644 index 000000000..319ee4b98 --- /dev/null +++ b/tests/default/ingest/processor/grok.yaml @@ -0,0 +1,16 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test retrieving grok processor patterns. +chapters: + - synopsis: Retrieve the patterns included with the grok processor. + path: /_ingest/processor/grok + method: GET + response: + status: 200 + - synopsis: Retrieve the patterns included with the grok processor by key name. + path: /_ingest/processor/grok + method: GET + parameters: + s: true + response: + status: 200