Created
July 16, 2017 18:07
-
-
Save twistedpair/bc743b7e1a4b41753de6b148280410da to your computer and use it in GitHub Desktop.
Swagger Spec Simple Validation Script
This file contains hidden or 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
#!/bin/bash | |
set -e | |
FULL_SPEC_PATH="/path/to/spec.json" # Absolute, please | |
# Idempotent, local library install | |
virtualenv . | |
source bin/activate | |
pip install swagger-spec-validator | |
# Test the Spec | |
python -c "from swagger_spec_validator import validate_spec_url; validate_spec_url('file://${FULL_SPEC_PATH}')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment