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

Support openapi 'servers' #216

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

Conversation

aVolpe
Copy link

@aVolpe aVolpe commented Apr 24, 2023

In openapi 3 the 'schemes' and 'basePath' were replaced with a single
property called 'servers', in this property we introduce the available
servers with the full path, for example:

servers:
  - url: https://statsapi.web.nhl.com/api/v1

With this change, a flag is added in the parsing of the context
is_open_api that can be used to check for the new properties available
in open api 3.

fixes #197

This PR also fixes the test test_spec_from_http_only that relied on an old spec that is no longer available.

This commit also fixes a test with the previous spec file
(https://api.apis.guru/v2/specs/medium.com/1.0.0/swagger.json) that is
no longer available.

Signed-off-by: Arturo Volpe <[email protected]>
In openapi 3 the 'schemes' and 'basePath' were replaced with a single
property called 'servers', in this property we introduce the available
servers with the full path, for example:

```yaml
servers:
  - url: https://statsapi.web.nhl.com/api/v1
 ```

With this change, a flag is added in the parsing of the context
`is_open_api` that can be used to check for the new properties available
in open api 3.

fixes httpie#197

Signed-off-by: Arturo Volpe <[email protected]>
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.

Bug: OpenAPI schemas give wrong completion when the root of the API is a path relative to the domain
1 participant