-
Notifications
You must be signed in to change notification settings - Fork 91
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
Question about testing API's with https #103
Comments
@chartjes I would like to clarify the problem you describe:
schemes: ["http", "https"]
If it's not what you want, could you describe your problem more precisely? |
Thanks for the quick response. Yes, you are describing what I want to do. So am I correct in thinking if I only put https in the schemes section that will work? |
Yes, that should work. My personal usage is local testing a development server in http, not https. If there is any problem when using https, please feel free to report it. And I would add a way to provide a preference on schemes, which would be included in next release. |
I still feel like I am misunderstanding something. So here is my swagger file: https://gist.github.com/chartjes/ffb6c9b34f242707f8acd819a7cb8950 And here is my code example taken from the docs:
I do have the requests library already installed
|
The Operation object is a 'callable' object in python, the parameter used to call it is exactly the parameter you described in Swagger Document. refer to here for a mapping from Swagger Parameter to the python primitives. In your case, it should work when use it in this way: response = client.request(op(), opt=opt) |
That did the trick. I'll close this and thank you for your help. FYI us QA folk at Mozilla are starting to use Swagger/OpenAPI as part of the overall testing process and pyswagger is a tool I'm hoping to use a lot. |
- pyopenapi/pyswagger#103 - pyopenapi/pyswagger#92 - pyopenapi/pyswagger#100 support python 3.6 - pyopenapi/pyswagger#92
My apologies if this is the wrong place to ask.
I'm trying to test a site with endpoints that are behind https. I saw that you can override url_netloc but I don't see how you tell pyswagger to use https
The text was updated successfully, but these errors were encountered: