2

there is a url like http://someservice.com/confirm?{token}

Is this any way how to describe this endpoint in terms of swagger notation

if use as query parameter then you get

  /confirm:
    get:
      summary: ...
      parameters:
        - in: query
          name: token
        ...

http://someservice.com/confirm?token=value that is not OK

from other side it is not possible to use url notation in follow way:

  /confirm?{token}:
    get:
      summary: ...
      parameters:
        - in: path
          name: token
        ...

due to query strings in paths are not allowed.

Helen
  • 87,344
  • 17
  • 243
  • 314
Rinat
  • 429
  • 5
  • 14

1 Answers1

1

This is currently not supported, neither in OpenAPI 2.0 nor in OpenAPI 3.0. Here's the corresponding feature request:

Support for arbitrary query strings

Helen
  • 87,344
  • 17
  • 243
  • 314