RESTful API Checker
Validate RESTful best practices on your OpenAPI/Swagger specs. Generates HTML reports with actionable feedback.
This project is stable. Bug fixes will be released as issues are reported.
Installation
pip install restful-checker
Requires Python 3.8+
Usage
# Local file
restful-checker path/to/openapi.json
# Remote URL
restful-checker https://api.example.com/openapi.yaml --open
# Generate HTML + JSON
restful-checker openapi.json --output-format both --output-folder reports
Options
| Option | Description | Default |
|---|---|---|
--output-format |
html, json, or both |
html |
--output-folder |
Destination folder | ./html |
--open |
Open HTML in browser | false |
-q, --quiet |
Suppress output | false |
--version |
Show version | - |
What It Checks
URL Design
| Check | Description |
|---|---|
| Versioning | Ensures /v1/, /v2/ appears early in paths |
| Resource Naming | Detects verbs in URIs, suggests pluralization |
| Resource Nesting | Validates patterns like /users/{id}/orders |
| Path Parameters | Verifies consistent {param} usage |
HTTP Standards
| Check | Description |
|---|---|
| HTTP Methods | Validates GET, POST, PUT, DELETE usage |
| Status Codes | Checks proper use of 200, 201, 400, 404, 409, etc. |
| Content Types | Verifies application/json usage |
| HTTPS Enforcement | Ensures all servers use HTTPS |
Response Quality
| Check | Description |
|---|---|
| Response Examples | Encourages example in responses |
| Error Format | Suggests structured code and message fields |
| Response Wrapping | Warns about unnecessary envelopes |
Performance
| Check | Description |
|---|---|
| Pagination | Suggests ?page= and ?limit= for collections |
| Query Filters | Recommends filters like ?status= |
| GZIP Support | Checks Accept-Encoding |
Programmatic Usage
from restful_checker.engine.analyzer import analyze_api
result = analyze_api("path/to/openapi.json", output_dir="output")
print(f"HTML: {result['html_path']}")
print(f"JSON: {result['json_path']}")
print(f"Score: {result['json_report']['score']}")
Project Structure
restful_checker/
├── checks/ # Validation modules
├── engine/ # OpenAPI loader
├── report/ # HTML rendering
├── tools/ # CLI utilities
└── main.py # Entrypoint
Contributing
Found a bug? Open an issue.
License
MIT
Metadata
Release files for restful-checker 3.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| restful_checker-3.1.1.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| restful_checker-3.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.3 kB
Release files / restful_checker-3.1.1.tar.gz
| Download URL | restful_checker-3.1.1.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ca481e920cf9b445a949c67fb9734caf005338e40efdfd2f3b993bddb78bd72
|
|
BLAKE2b-256 checksum How to use checksums |
72ff9290d9fed906f975b9302b012d806ce388f02f532aad4cf94c825c140009
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logRelease files / restful_checker-3.1.1-py3-none-any.whl
| Download URL | restful_checker-3.1.1-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1bd763d089b89262b809aba49ac1e25bcb7800c56d2a605a8491f22c1a2b598
|
|
BLAKE2b-256 checksum How to use checksums |
d0c1fcf75b098194f32e56311ae639b8eb414b82ea56f72c9afc6a31c45b829c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency log