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

Unexpected attribute name generated when using query parameter with hyphen #1405

Open
himan085 opened this issue Sep 16, 2024 · 0 comments
Open

Comments

@himan085
Copy link

himan085 commented Sep 16, 2024

Hi,
I am using Smithy models, which convert to Open API schema. It is further used to generate code in TypeScript.
I want to understand the deserialisation behaviour of httpQuery trait.
It mentions that : "Binds an operation input structure member to a query string parameter."
For the below code:

@input
structure ListThingsInput {
    @httpQuery("object-color")
    color: String
}

I was expecting that the query string params used by the clients would be object-color but when Smithy forms the deserialised structure it would have a property of color. But I'm observing the de-serialised structure actually contains objectColor and not color.

Is this expected ? If yes, then what's the significance of specifying color again as a member in the structure.
Thanks in advance!

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

No branches or pull requests

1 participant