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:
routes.json- Input routes filelaravel- Framework name (laravel, symfony, codeigniter)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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file php_framework_routes_to_openapi_converter-0.1.3.tar.gz.
File metadata
- Download URL: php_framework_routes_to_openapi_converter-0.1.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7fa86637e3df93ee06cce6f1a0ba3e6e7cf7fc09e9cc54f8f5cb8793bb4d177
|
|
| MD5 |
a0b1ed9c412984eeab6b95e5de259c2a
|
|
| BLAKE2b-256 |
a00366f7caef51c0822fed07e2f67ef6f9d4295ef98355b104df86d84adb1c61
|
File details
Details for the file php_framework_routes_to_openapi_converter-0.1.3-py3-none-any.whl.
File metadata
- Download URL: php_framework_routes_to_openapi_converter-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1036df034a4116d33cf8649bf6ba11364116c1c3b2c5cb22d808acb4cf21ec88
|
|
| MD5 |
c401bc8fa5f68af02935bb2280b37047
|
|
| BLAKE2b-256 |
c0193c82c5e458fb8827355b5dc60143f2ed43a8789cf360603cc4072dd6c730
|