Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brachi-wernick/d24bdb187a1f5931c8fc1cba92535e67 to your computer and use it in GitHub Desktop.
Save brachi-wernick/d24bdb187a1f5931c8fc1cba92535e67 to your computer and use it in GitHub Desktop.
AddAwsGatewayResourceMethodResponse.java
Map<String, String> modelName = new HashMap<String, String>() {{
put("application/json", outputModelName);
}};
//rootResource was found previously
gateway.putMethodResponse(new PutMethodResponseRequest()
.withHttpMethod("POST")
.withResponseModels(modelName)
.withRestApiId(targetRestApiId)
.withResourceId(rootResource)
.withStatusCode("200"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment