Skip to main content

Check RESTful API compliance from OpenAPI definitions and generate HTML reports

Project description

RESTful API Checker

PyPI version Python License Downloads

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


Buy Me a Coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

restful_checker-3.1.1.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

restful_checker-3.1.1-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file restful_checker-3.1.1.tar.gz.

File metadata

  • Download URL: restful_checker-3.1.1.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for restful_checker-3.1.1.tar.gz
Algorithm Hash digest
SHA256 2ca481e920cf9b445a949c67fb9734caf005338e40efdfd2f3b993bddb78bd72
MD5 7ae59eaba7853fa815b076107a327a7c
BLAKE2b-256 72ff9290d9fed906f975b9302b012d806ce388f02f532aad4cf94c825c140009

See more details on using hashes here.

Provenance

The following attestation bundles were made for restful_checker-3.1.1.tar.gz:

Publisher: upload-python-package.yml on JaviLianes8/restful-checker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file restful_checker-3.1.1-py3-none-any.whl.

File metadata

  • Download URL: restful_checker-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for restful_checker-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1bd763d089b89262b809aba49ac1e25bcb7800c56d2a605a8491f22c1a2b598
MD5 03bbbd480e977d41caa8ea6f1cf4fdad
BLAKE2b-256 d0c1fcf75b098194f32e56311ae639b8eb414b82ea56f72c9afc6a31c45b829c

See more details on using hashes here.

Provenance

The following attestation bundles were made for restful_checker-3.1.1-py3-none-any.whl:

Publisher: upload-python-package.yml on JaviLianes8/restful-checker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page