Skip to content

Instantly share code, notes, and snippets.

View alt-st's full-sized avatar

Aleksandr Semenov alt-st

View GitHub Profile
@alt-st
alt-st / swagit.php
Created April 17, 2025 12:27 — forked from ls-dac-chartrand/swagit.php
Swag It: Reverse engineer Swagger-PHP annotations from an existing JSON payload
<?php
// -------------------------------------------------------------------------------------
// Tool to generate Swagger-PHP PHP 8 Attributes from JSON.
// Paste your JSON into the input field to generate the code.
// Inspired by: https://github.com/Roger13/SwagDefGen
// How to run:
// php -S localhost:8888 -t .
// http://localhost:8888/swagit-attrs.php
// -------------------------------------------------------------------------------------