kin-openapi icon indicating copy to clipboard operation
kin-openapi copied to clipboard

any optiont to treat path with and without trailing slash the same?

Open tigerinus opened this issue 3 years ago • 1 comments

I find that request validator differentiate these two specs: one with trailing slash (e.g. GET /event/?a=123) and one without (e.g. GET /event?a=123). To workaround it I will have to define both.

  /event/:
    get:
      summary: Get all events
      responses:
          ...
  /event:
    get:
      summary: Get all events
      responses:
          ...

Is there an option so both GET /event/?a=123 and GET /event?a=123 are mapped to the same route?

Thanks!

tigerinus avatar Jan 10 '23 18:01 tigerinus

There's no such option. These are semantically different routes, how do you see such an option should work?

fenollp avatar Nov 28 '23 08:11 fenollp