2 Answers
- Newest
- Most votes
- Most comments
1
Hi,
Yes, It is possible to have multiple dynamic paths, as long as the path variables are the same. I assume that the API Gateway will validate the route path by path, and there can be no ambiguities.
{
"openapi" : "3.0.1",
"info" : {
"title" : "Test",
},
"paths" : {
"/{a}" : {
"get" : {
"parameters" : [ {
"name" : "a",
"in" : "path",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "200 response",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Empty"
}
}
}
}
}
}
},
"/{a}/{b}" : {
"get" : {
"parameters" : [ {
"name" : "a",
"in" : "path",
"required" : true,
"schema" : {
"type" : "string"
}
}, {
"name" : "b",
"in" : "path",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "200 response",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Empty"
}
}
}
}
}
}
},
},
"components" : {
"schemas" : {
"Empty" : {
"title" : "Empty Schema",
"type" : "object"
}
}
}
}
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Does my answer solve your question or do I misunderstand your issue?