2 Respuestas
- Más nuevo
- Más votos
- Más comentarios
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"
}
}
}
}
0
The non-matching path variables was my issue, thank you for the response!
respondido hace un mes
Contenido relevante
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año
Does my answer solve your question or do I misunderstand your issue?