-
Notifications
You must be signed in to change notification settings - Fork 220
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
Relax httpPayload constraints #636
Comments
Thanks for raising this issue. I think we'd be open to expanding the |
The more I think about this the more I think we should do it. OpenAPI does seem to allow it, and technically a Document shape could be any json-like data so it kind of already is allowed. I still need to do some research to see if it breaks any AWS tooling (and if so, how we mitigate that) but one way or another I think it should be done. |
Are there any plans to update the HTTP spec documentation and add tests to the rest-json-1 protocol test suite to exercise this new functionality? |
As the documentation introduced in #683 indicates, the AWS protocols do not support this behavior at this time. |
We'll do new documentation build once this goes out in a release |
Thank you. |
Using smithy-model 1.3.0 :
The problem:
The httpPayload trait is currently constrained to target a member that itself points to :
I'm trying to translate a couple of my organisation's APIs to smithy semantics, to assess whether it'd work for us as an IDL. We have several endpoints (think rest-json) that return maps/lists in the body of the responses, which is currently not possible to describe in smithy (using out-of-the-box features) due to the constraints on the httpPayload trait.
And educated guess tells me that the constraints on the httpPayload trait come from the xml-based protocols which AWS uses. Imho, these constraints should not be inherent to the trait, but rather tied to protocol-specific validation logic.
Obvious, I'd prefer not having to define my own http-bindings set of traits, as piggybacking on the ones provided out of the box drastically lowers the effort required for building tooling.
My questions :
PS : I'm greatly enjoying prototyping tooling around smithy, keep up the good work 😄
The text was updated successfully, but these errors were encountered: