-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
allowing scalar params to be null and still validate if they're not required #225
Conversation
…equired (eg params.ProviderId can be set to null now as per docs for google+ provider)
Unfortunately this breaks our existing test suite. Can you explain a little more about the issue you are seeing? The SDK should already handle passing null through to ProviderId. |
@seeekr thanks for the pull request illustrating the deficiency in parameter validation. I've taken your code and added some extra functionality to deal with null values passing through to serialization, and also supporting nulls on structs/maps/lists. In short, passing a null should now behave as if the property was not set, which is the intention of the guide documentation when it suggests setting Note that the current workaround would be to omit |
@lsegal awesome! I hadn't had the chance yet to get back to the issue and it's great to see that you've figured it out without further input from me! What you're saying sounds great! re docs: Yes, I do think that until there is a new RC release of the API the docs should be updated to reflect that ProviderId: null will not work and instead to leave it out for Google+, maybe ideally with a note highlighted in red so it's clear what would be the "proper" way of doing it and that just until RC10 (or whatever release is next) the workaround is to do it this way. |
@lsegal and wow, I just had a look at the commit - it would have taken me ages to get into the code well enough to be able to make (suggest) the appropriate changes myself :) thanks! |
@seeekr keep in mind that for Google+ your WebIdentityToken has to use the |
@lsegal oh god, I totally used |
I agree that we could be doing a better job documenting these integration points between identity providers. Improving this getting started experience is on our roadmap. Thanks for the feedback! |
OK, so I had to go back and try that. Yes, there is definitely a difference between using re: getting started experience - cool, it's pretty good already though :) Docs are very easy to follow, even though some of the process is a bit tedious and requires lots of steps in different UIs. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
this is important as e.g. AWS.config.credentials needs ProviderId to be null for google+ provider, as per current JS SDK docs.
I'm not 100% certain this is exactly how you'd make such a change but there definitely seems to be the need to enhance validation with instructions that deal with null values! Definitely for scalars, absolutely not sure about whether the other (composite) types need that at all.