Forum Discussion

garymazz's avatar
New Contributor
5 years ago

Can I change swagger's separation delimiters for pipe query params ?



I'm trying to define an early rest, pre-crud api in swagger. 

The syntax looks like this: 


PUT /MyContainer/MyDataObject.txt?metadata:colour;metadata:shape;metadata:size


I'd like to change the equal sign '=' to a colon ':' and the ampersand '&'  to a semicolon ';'. 

Is this possible  ?   


An alternative would be having a default query parameter without requiring a tag in the uri.




2 Replies

    • garymazz's avatar
      New Contributor

      Hi HKosova 


      Thank you for the quick reply. I was suspect swagger couldn't handle non-k=v parameters, but was just checking to confirm.  


      Interestingly, I indepentedntly went down the same work around path in Its been nearly 2 years since this issue was opened and there seems to be little movement on it.  


      I would hate to have to move to raml over this one feature (validation via regex), I'll have to write a code genererator for a c++ framework and one for spring boot.


      However seeing no action was taken on this issue in 2 years, the raml route seems easier (more timely) than changing the OAS specification and code changes to swagger core, doumentation and scaffold generators.