aws-sdk-ruby
aws-sdk-ruby copied to clipboard
Generated API Gateway SDK does not provide a way to pass http headers
Consider an API Gateway endpoint with a required HTTP request header for Accept-Language (e.g OpenAPI def):
"paths": {
"/jobs/{id}": {
"get": {
"operationId": "getById",
"produces": [
"application/json"
],
"parameters": [
{
"name": "Accept-Language",
"in": "header",
"required": true,
"type": "string"
}
The generated Ruby SDK does not provide a way to pass the required parameter to the endpoint.
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
API Gateway generated aws-sdk-v3
Thanks,
Thanks for the feedback! Tracking this as a feature request for our client interface : D
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.
I have been trying to get headers to show up in the generated gem but they only seem to work if you prefix with an X. So 'X-MY-header-example' works but, 'MY-header-example' does not work. We need the latter to work. Does anyone know how to achieve this?
Example serverless file:
events:
- http:
path: /v1/my-test-endpoint
method: POST
documentation:
summary: 'test summary'
description: 'test desc'
requestModels:
application/json: TestRequest
requestHeaders:
- name: MY-header-example
description: 'example header that does not work'
required: true
- name: X-MY-header-example
description: 'example header that works'
required: true
- name: X-Correlation-ID
description: ' Unique ID that can be used to tie together log and other messages across multiple systems.'
required: true
methodResponses:
- statusCode: '200'
responseBody:
description: 'Response for example endpoint'
responseModels:
application/json: EmptyResponse
- statusCode: '400'
responseModels:
application/json: ExampleErrors
- statusCode: '500'
responseModels:
application/json: ExampleErrors
reqValidatorName: RequestValidator
authorizer: aws_iam
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.