Skip to main content

Convert PHP framework routes to OpenAPI 3.0 specifications

Project description

PHP Framework Routes to OpenAPI Converter

Convert PHP framework routes to OpenAPI 3.0 specifications.

Supported Frameworks

  • Laravel
  • Symfony
  • CodeIgniter

Installation

pip install -e .

Usage

CLI

python -m php_framework_routes_to_openapi_converter.cli convert routes.json laravel openapi.json

Arguments:

  1. routes.json - Input routes file
  2. laravel - Framework name (laravel, symfony, codeigniter)
  3. openapi.json - Output OpenAPI file

Python

from php_framework_routes_to_openapi_converter import convert_routes_to_openapi

routes = [
    {"uri": "/users", "methods": ["GET"], "name": "users.index"},
    {"uri": "/users/{id}", "methods": ["GET"], "name": "users.show"},
]

spec = convert_routes_to_openapi(routes, "laravel")

Example

python example.py

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

Built Distribution

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

File details

Details for the file php_framework_routes_to_openapi_converter-0.1.8.tar.gz.

File metadata

File hashes

Hashes for php_framework_routes_to_openapi_converter-0.1.8.tar.gz
Algorithm Hash digest
SHA256 717d484571fd280eeda0d900c0967f7f34e6a4981df231000256b4d32afb1149
MD5 a94a840dd36a0c01709fd54e3b8edc50
BLAKE2b-256 2e61dda7b8f41a88b7b542b1ff40d670f534e9c422612f5295ae469e94e4e811

See more details on using hashes here.

File details

Details for the file php_framework_routes_to_openapi_converter-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for php_framework_routes_to_openapi_converter-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3665485a84397826e7f8d96405b065e12a621ac164d77e33980fb5d0b2ad6a57
MD5 8a8741d1dcb52dc3a44fb29446cad972
BLAKE2b-256 ac4c221b798a5203b1389f71195a402c9230144a38089306ce36c19e9c40a872

See more details on using hashes here.

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