Ask questionsIs `:` a valid delimiter for the path parameter?

Dear OpenAPI specification experts,

I have a question regarding "path pattern" and "path parameters". The questionis whether this path pattern /somePath/{param1}:{param2} is valid.

Let's split the whole "path pattern" (/somePath/{param1}:{param2}) into multiple parts with /, so the original "path pattern" contains two parts:

  1. /somePath
  2. /{param1}:{param2}

Usually, every part contains one parameter like this example /cars/{carId}/drivers/{driverId}, where the {carId} and {driverId} are located in different parts. However, /{param1}:{param2} contains two parameters connected with a delimiter :.

This doc shows how style keyword is related to the delimiters, which does not tell that : is a valid delimiter.

As : is not mentioned as one of the supported delimiters, I would assume, my example is an invalid "path pattern". Could you please share your opinion and maybe point out some docs that I might miss.

Thank you very much in advance.

Best regards, Junjie


Answer questions MikeRalphson

Yes, you need to define both in: path parameters to match the path templated items. Each in: path parameter must have required: true.

All of your other examples are valid.

I'm not sure what you mean by "special characters" though. ? and # cannot appear unescaped in a path key, % introduces a hex-coded character... were you thinking of these or some other characters?

Mike Ralphson MikeRalphson Postman, Inc. Newbury. UK My hovercard is full of eels. I will not buy this repository; it is scratched.
Github User Rank List