webapi icon indicating copy to clipboard operation
webapi copied to clipboard

Webapi-Swagger : Handle special Path Param case (Github paths)

Open kahlil29 opened this issue 5 years ago • 0 comments

In the GitHub Swagger File, we encountered a Path with the following format :

'/repos/{owner}/{repo}/compare/{baseId}...{headId}':

This is quite a special case and the code is currently not configured to handle a case like this. A potential solution to this issue would be to have a type

data HPathParam = HPathParam
  {
    baseId :: Text
  , headId :: Text
  } -- and maybe another field for the text in between the two params

And in the ToParam instance we would need to combine these 3 things into a single Path param.

Also, we need to see how Webapi would handle this in the Contract. The fix for this ticket would probably only make sense once this is handled in Webapi.

kahlil29 avatar Apr 05 '19 07:04 kahlil29