This project provides API validation for STAPI FastAPI implementations using Schemathesis against the latest STAPI OpenAPI specification.
- The STAPI OpenAPI specification is fetched from: https://raw.githubusercontent.com/stapi-spec/stapi-spec/refs/heads/main/openapi.yaml
- The base URL for the API being tested is set to
http://localhost:8000
. Update theBASE_URL
intests/validate_api.py
if your API is hosted elsewhere.
-
Install dependencies:
poetry install
-
Run tests and generate report:
poetry run pytest tests/validate_api.py --html=report.html --self-contained-html
-
Open
report.html
in your browser to view the detailed test report.