Skip to content

Conversation

@pbasista
Copy link
Contributor

@pbasista pbasista commented Feb 15, 2018

The specification:

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#oasObject

requires that if the servers array is not provided or empty,
its default value is an array of a single Server Object
with url of /.

This can only be merged after PRs #13 and #14 are merged.

The specification:

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#schemaObject

clearly states that fields:

- #/info
- #/paths
- #/components
- #/components/schemas
- #/components/responses
- #/components/parameters
- #/components/requestBodies

are objects.
@pbasista pbasista force-pushed the bugfix/empty-servers branch 2 times, most recently from 60c04b3 to cf58ac6 Compare February 15, 2018 15:39
@codecov
Copy link

codecov bot commented Feb 15, 2018

Codecov Report

Merging #15 into master will increase coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #15      +/-   ##
=========================================
+ Coverage   97.16%   97.3%   +0.14%     
=========================================
  Files          18      18              
  Lines         883     892       +9     
=========================================
+ Hits          858     868      +10     
+ Misses         25      24       -1
Impacted Files Coverage Δ
openapi_core/components.py 100% <100%> (ø) ⬆️
openapi_core/servers.py 100% <100%> (+2.04%) ⬆️
openapi_core/specs.py 97.33% <100%> (ø) ⬆️
openapi_core/operations.py 96.66% <100%> (+0.05%) ⬆️
openapi_core/validators.py 98.52% <100%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e451c9f...a0305fb. Read the comment docs.

@pbasista pbasista force-pushed the bugfix/empty-servers branch 5 times, most recently from eaab23b to 253665e Compare February 18, 2018 08:18
The specification:

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#oasObject

requires that if the 'servers' array is not provided or empty,
its default value is an array of a single Server Object
with 'url' of '/'.
@pbasista pbasista force-pushed the bugfix/empty-servers branch from 253665e to a0305fb Compare February 18, 2018 08:38
@p1c2u p1c2u merged commit a3853da into python-openapi:master Feb 28, 2018
@p1c2u
Copy link
Collaborator

p1c2u commented Feb 28, 2018

@pbasista Nicely done. Thanks.

bjmc pushed a commit to bjmc/openapi-core that referenced this pull request Jun 12, 2019
Add the default value for the 'servers' array
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