Clarification about path template uri that may or not clash with other paths #2954
-
Hi!. This is related to: #2753 Context: we have an OAS 3.0 api with two path objects: The question is: do these paths clash with each other or are they valid according to the spec? The only thing I found but that doesn't apply to this case completely is:
What would happen if instead of only two path objects, there were three:
This is all without taking into account the different styles the template parameter could have. How should API processors handle all these variations? It seems to me that this might be really error-prone for processors. Here an API showcasing this: openapi: "3.0.0"
info:
version: 1.0.0
title: mytest
paths:
/v2:
get:
responses:
"200":
description: "___"
/v2{params}:
parameters:
- in: path
name: params
required: true
schema:
type: string
post:
responses:
"200":
description: "_______" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I don't see any problem with the described definition. With the case of |
Beta Was this translation helpful? Give feedback.
-
Great, thanks for the clarification! |
Beta Was this translation helpful? Give feedback.
-
Closing as answered. |
Beta Was this translation helpful? Give feedback.
I don't see any problem with the described definition. With the case of
/v2another
and/v2{param}
(clashes with/v2another
if param == another), the definition of/v2another
will take precedence because it's a specific case definition.