Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiGatewayV2Client::get_apis: incorrectly (?) cased JSON #1958

Open
stanislav-tkach opened this issue Sep 27, 2021 · 1 comment · May be fixed by #1959
Open

ApiGatewayV2Client::get_apis: incorrectly (?) cased JSON #1958

stanislav-tkach opened this issue Sep 27, 2021 · 1 comment · May be fixed by #1959

Comments

@stanislav-tkach
Copy link

I'm trying to use ApiGatewayV2Client::get_apis to get a list of apis, but it returns an empty list (the GetApisResponse::items vector is empty). After enabling logging I can see that the response status is 200 and it contains apis' information:

{
    "items": [
        {"apiId" : "0ei2qoop3g", "name" : "test_api", "protocolType" : "HTTP", ... },
        { ...other apis... }
    ]
}

All field names start with a lowercase letter, and the corresponding rusoto structure expects upper-cased field names (for example "ProtocolType" instead of "protocolType").

As far as I can see, the declaration from which rusoto structures are generated also contains fields starting from an upper-cased character. I'm not sure on which side the issue is, but the similar code using Python boto3 SDK is working as expected:

response = self.apigw.get_apis()

for item in response['Items']:
    print(item['ApiId'])
    print(item['Name'])

I could submit a pull request that changes GetApisResponse and Api structs declaration, but changing the generated code feels slightly wrong.

@stanislav-tkach stanislav-tkach changed the title ApiGatewayV2Client::get_apis: incorrectly (?) cased JSON ApiGatewayV2Client::get_apis: incorrectly (?) cased JSON Sep 27, 2021
@stanislav-tkach
Copy link
Author

Additionally, I have just noticed that the date format is different in the response ("2021-06-10T17:19:01Z") and the rusuto declaration (Option<f64>).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant