-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test to validate the OAS spec.
- Loading branch information
Rémy HUBSCHER
committed
Aug 7, 2017
1 parent
e27b674
commit bd3893c
Showing
3 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os.path | ||
import ruamel.yaml as yaml | ||
from swagger_spec_validator.validator20 import validate_spec | ||
|
||
HERE = os.path.dirname(__file__) | ||
|
||
|
||
def test_oas_spec(): | ||
with open(os.path.join(HERE, "..", "api.yaml"), 'r') as stream: | ||
oas_spec = yaml.load(stream) | ||
# example for swagger spec v2.0 | ||
validate_spec(oas_spec) |