Skip to main content

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

Release files for php-framework-routes-to-openapi-converter 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for php-framework-routes-to-openapi-converter 0.1.8
File Size Uploaded
php_framework_routes_to_openapi_converter-0.1.8.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for php-framework-routes-to-openapi-converter 0.1.8
File Interpreter ABI Platform
php_framework_routes_to_openapi_converter-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 52.8 kB

Release files / php_framework_routes_to_openapi_converter-0.1.8.tar.gz

Download URL php_framework_routes_to_openapi_converter-0.1.8.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
717d484571fd280eeda0d900c0967f7f34e6a4981df231000256b4d32afb1149
BLAKE2b-256 checksum
How to use checksums
2e61dda7b8f41a88b7b542b1ff40d670f534e9c422612f5295ae469e94e4e811
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.20

Release files / php_framework_routes_to_openapi_converter-0.1.8-py3-none-any.whl

Download URL php_framework_routes_to_openapi_converter-0.1.8-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3665485a84397826e7f8d96405b065e12a621ac164d77e33980fb5d0b2ad6a57
BLAKE2b-256 checksum
How to use checksums
ac4c221b798a5203b1389f71195a402c9230144a38089306ce36c19e9c40a872
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.20

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page