mohsen1 / multi-file-swagger-example

Multi-file Swagger example
http://azimi.me/2015/07/16/split-swagger-into-smaller-files.html
168 stars 39 forks source link

post and get to same path gets swallowed #2

Closed tobad357 closed 9 years ago

tobad357 commented 9 years ago

In our api we have

/user - GET /user - POST

If I put the following in the pats/index.yaml file

/user: $ref: ./user.create.yaml /user: $ref: ./user.get.yaml

One of the references will disappear from the output. What is the preferred way of setting up a path that has the same URI but not the same method?

tobad357 commented 9 years ago

So for future reference YAML doesn't support multiple variables with same name One correct way to do it is

/path: get: $ref: ./path.def.get.yaml post: $ref: ./path.def.post.yaml