mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
fix(apigateway): accept any Content-Type on Put/ImportRestApi (#925)
* fix(apigateway): accept any Content-Type on PutRestApi and ImportRestApi The class-level @Consumes restricted these endpoints to application/json and application/json-patch+json, so JAX-RS returned 415 for any other Content-Type. The Terraform AWS provider sends the OpenAPI body as application/octet-stream, which broke aws_api_gateway_rest_api with an inline body. Use @Consumes(WILDCARD) on createRestApi and putRestApi, matching the pattern already used for opaque-body endpoints in BedrockRuntime, S3Control, and AppConfig. The underlying Swagger parser content-sniffs the body, so JSON and YAML payloads keep working regardless of the declared Content-Type. Closes #855 * ci: re-trigger sdk-test-node after transient npm registry 404
This commit is contained in:
1 parent
d89270c538
commit
b8d1b817c9
2 files changed
+76
No files matched your search
@@ -222,6 +222,7 @@ public class ApiGatewayController {
|
||||
|
||||
@POST
|
||||
@Path("/restapis")
|
||||
@Consumes(MediaType.WILDCARD)
|
||||
public Response createRestApi(@Context HttpHeaders headers,
|
||||
@QueryParam("mode") String mode,
|
||||
String body) {
|
||||
@@ -242,6 +243,7 @@ public class ApiGatewayController {
|
||||
|
||||
@PUT
|
||||
@Path("/restapis/{apiId}")
|
||||
@Consumes(MediaType.WILDCARD)
|
||||
public Response putRestApi(@Context HttpHeaders headers,
|
||||
@PathParam("apiId") String apiId,
|
||||
@QueryParam("mode") String mode,
|
||||
|
||||
Reference in new issue
Block a user