opensearch-api-specification icon indicating copy to clipboard operation
opensearch-api-specification copied to clipboard

[FEATURE] Allow $ref's in query/path parameters

Open dblock opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

In spec/namespaces/ism.yaml I tried to use $refs in path and query parameters that are repeated a lot.

Instead of:

   parameters:
     ism.head_policy::path.policy_id:
      name: policy_id
      in: path
      required: true
      schema:
        type: string

I tried

parameters:
  ism.head_policy::path.policy_id:
      $ref: '../schemas/ism._common.yaml#/components/parameters/ism::path.policy_id'

This failed with an error in tests.

FAILED  policy_id (Schema for "policy_id" parameter not found.)

What solution would you like?

Allow refs in parameters.

Do you have any additional context?

I couldn't figure out where/how to dereference these.

dblock avatar Sep 15 '24 11:09 dblock