Forum Discussion

yym's avatar
yym
New Contributor
3 years ago
Solved

How to define a JSONPath query parameter?

Hi all.

How I can define a query parameter which is a JSONPath expression in OASv3?

The request example: GET /v1/service?filter=[*].virtualNetworkServices[?(@.status==’reserved’)]

Is my below OAS definition correct?

parameters:

        - in: query

          name: filter

          schema:

            type: string

          allowReserved: true

          description: JSONPath expression

Thank you!

  • Looks good to me! There's no special data type for "JSONPath expression", it's just a string.

1 Reply

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Looks good to me! There's no special data type for "JSONPath expression", it's just a string.