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.7.tar.gz.

File metadata

File hashes

Hashes for php_framework_routes_to_openapi_converter-0.1.7.tar.gz
Algorithm Hash digest
SHA256 4990ac997aa0066defa8c6a990853885e7adaee530768eddc6ca6648090d7b82
MD5 f655f58bf3368ee08f4698e0499cb37e
BLAKE2b-256 5afb022bb4478ab22bd0a820147050927268bfba9bfe520da87296337e08759d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for php_framework_routes_to_openapi_converter-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 191834845d1bd6b38fb5aac8c42647a671155f7b09c751db99365e799927627e
MD5 2fc46db8be29d90bb324f9fda54a3558
BLAKE2b-256 86b55fe03ab4fd912c03121cbe2878f02a3f49453b96d8efb7388bf7e1679c49

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