-
Hi all, My question is related to the server URL and path. Let's assume we have the following specification (I will omit some parameters): servers:
- url: https://fake-environment.com
paths:
- /cars: # POST - GET
$ref: paths/cars.yaml
- /cars/test1: # GET
$ref: paths/cars-test1.yaml
- /cars/test2: # GET
$ref: paths/cars-test2.yaml
.... (All paths start with `/cars`) In a refactor, I decide to move servers:
- url: https://fake-environment.com/cars
paths:
- /: # POST - GET
$ref: paths/cars.yaml
- /test1 : # GET
$ref: paths/cars-test1.yaml
- /test2: # GET
$ref: paths/cars-test2.yaml However this is a little bit weird, because if I do a POST in the original one, it was POST https://fake-environment.com/cars, but in the new one it will be POST https://fake-environment.com/cars/ . So my question here is:
If you need more explanation, please let me know. Thanks in advance!!! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can't avoid the |
Beta Was this translation helpful? Give feedback.
-
Since there haven't been further questions, I'm going to close this as resolved - please comment if there are still unresolved questions and I can re-open it. |
Beta Was this translation helpful? Give feedback.
You can't avoid the
/
at the end of the path because you can't define a Path Item under the empty string- it has to at least be"/"
. So no, you can't do this refactor I'm afraid.