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

Add more types to TypeMap #21

Open
rabbiveesh opened this issue May 28, 2020 · 1 comment
Open

Add more types to TypeMap #21

rabbiveesh opened this issue May 28, 2020 · 1 comment

Comments

@rabbiveesh
Copy link

Currently, Amazon::MWS::TypeMap only contains basic types, and the rest of the type scheme (which is totally undocumented, but the code is clear enough) resides in the code generated for each endpoint. There are two issues here:

  1. The system is actually very easily extended in terms of adding more basic endpoints (I know this b/c I'm implementing the Recommendations API). It would be easier for people to contribute and help this module cover the whole API if it were more clearly documented (like docs for List *List and *Array)

  2. There are types that aren't really covered by the current scheme, for example ListRecommendations's CategoryQueryList contains lists in some of its key-value pairs. I think if the type system were refactored to be totally in TypeMap, then it could be easily tested and also be made to have recursive types. (while I'm at it, the *Array type is a little terse, and would be better if it took a hashref and dealt with it properly rather than taking an arrayref. Make the calling code harder to use).

I'd be happy to implement this stuff, if that sort of contribution is wanted.

In a side note, what are the thoughts about implementing some sort of introspection for API params? I want to write a simple shell for using MWS, and it would be super cool if I could automatically get the param names from a name of an endpoint. While we're at it, it would also make it easy to generate docs for each endpoint.

@racke
Copy link
Member

racke commented May 28, 2020

OK that makes sense to me and yes that sort of contribution is wanted 👍
Please ensure that you rather submit small changes. Otherwise review would be too complicated. You can contact me on questions. W.i.p. previews are appreciated as well.

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

2 participants