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

Adding simple handling of Swagger 2.0 security schemes #10

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

dankellymn
Copy link

I've created annotations and tracking code to allow for a set of security tokens to be automatically handled.

There are 2 main drawbacks at this point:

  1. It assumes a single set of ANDed requirements
  2. It only supports basic or apiKey

@ibaca
Copy link
Member

ibaca commented Jul 13, 2018

hehe Ok, I see that the annotations are here 😄

@dankellymn
Copy link
Author

Sorry about the last two commits... I think they're good, but wasn't meaning to pull them. I just neglected to make a branch for this pull.


public FailedStatusCodeException(int status, String msg) {
public FailedStatusCodeException(int status, String responseText, String msg) {
Copy link
Member

@ibaca ibaca Jul 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

about adding more info into the exception, the currently recommended strategy is to add a RequestResourceBuilder.unexpectedMapper and extend the FailedStatusCodeException to add more data. We internally just extract whatever info we need from the request, and expose it in the exception message, so we don't need to extend the base exception.

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

Successfully merging this pull request may close these issues.

2 participants