Swagger: “equivalent path already exists” despite different parameters

前端 未结 1 1981
孤独总比滥情好
孤独总比滥情好 2020-12-11 17:14

I\'m trying to turn the Atom Publishing Protocol (RFC5023) in to a Swagger / OpenAPI spec to exercise writing those specs.

I ran into the following problem: in Atom

相关标签:
1条回答
  • 2020-12-11 17:51

    That's because the two paths can be identical. I understand that the parameters may uniquely identify them, but Swagger 2.0 doesn't support full URI templates, and the path portion alone is inspected for uniqueness. So these:

    /{foo}
    /{bar}
    

    are identical, even if foo must be a string, and bar must be a number. Please add your $0.02 on the OpenAPI Specification Repo as we're working on better path support right now.

    0 讨论(0)
提交回复
热议问题