pull out onChange handler for #input_apiKey so it can be called manually #594
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there. One feature clients have really loved is the ability to exercise the API endpoints with a prepopulated ApiKey if the API is protected with one. This comes in really handy for marketing purposes - people can play around in a sandbox environment before going through the process of getting a real ApiKey.
Before the introduction of the ApiKeyAuthorization class, setting the 'apiKey' property when creating SwaggerUi would pre-populate the 'api_key' input and then I just had to use that for generated API calls.
ApiKeyAuthorization is sweet but I'm wondering if we can just pull out the handler for change() on the 'api_key' input so that we can call it after code that sets the 'api_key' value manually? This is needed since the change() event doesn't fire unless focus is lost on an input - which it doesn't have in this case. I left in sample commented-out code that shows this.
What do you think?