Skip to content

Instantly share code, notes, and snippets.

@twistedpair
Created July 16, 2017 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twistedpair/bc743b7e1a4b41753de6b148280410da to your computer and use it in GitHub Desktop.
Save twistedpair/bc743b7e1a4b41753de6b148280410da to your computer and use it in GitHub Desktop.
Swagger Spec Simple Validation Script
#!/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