{"id":18013110,"url":"https://github.com/smillerdev/phpdraft","last_synced_at":"2025-04-06T02:09:43.193Z","repository":{"id":10624425,"uuid":"65147997","full_name":"SMillerDev/phpdraft","owner":"SMillerDev","description":"An API Blueprint parser in PHP","archived":false,"fork":false,"pushed_at":"2025-03-18T20:16:12.000Z","size":1411,"stargazers_count":38,"open_issues_count":9,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T01:09:14.253Z","etag":null,"topics":["api-blueprint","apiary","drafter","php"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SMillerDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"smillerdev"}},"created_at":"2016-08-07T18:29:07.000Z","updated_at":"2025-03-04T07:26:20.000Z","dependencies_parsed_at":"2023-10-11T08:33:59.008Z","dependency_job_id":"6c7c9a17-71e0-48e0-bb78-a40f319a5ba5","html_url":"https://github.com/SMillerDev/phpdraft","commit_stats":{"total_commits":630,"total_committers":8,"mean_commits":78.75,"dds":0.5079365079365079,"last_synced_commit":"41c6632d8f2f262b90e1f7bdac17a38ef9cf0814"},"previous_names":[],"tags_count":78,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMillerDev%2Fphpdraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMillerDev%2Fphpdraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMillerDev%2Fphpdraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMillerDev%2Fphpdraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SMillerDev","download_url":"https://codeload.github.com/SMillerDev/phpdraft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423515,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-blueprint","apiary","drafter","php"],"created_at":"2024-10-30T03:19:52.637Z","updated_at":"2025-04-06T02:09:43.158Z","avatar_url":"https://github.com/SMillerDev.png","language":"HTML","funding_links":["https://github.com/sponsors/smillerdev"],"categories":[],"sub_categories":[],"readme":"# PHPDraft [![Packagist Version](https://img.shields.io/packagist/v/smillerdev/phpdraft.svg)](https://github.com/SMillerDev/phpdraft/releases/latest) [![Sonar Quality Gate](https://img.shields.io/sonar/https/sonarcloud.io/SMillerDev_phpdraft/alert_status.svg)](https://sonarcloud.io/dashboard?id=SMillerDev_phpdraft) [![codecov](https://codecov.io/gh/SMillerDev/phpdraft/branch/master/graph/badge.svg?token=2IPSlcCwXM)](https://codecov.io/gh/SMillerDev/phpdraft) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSMillerDev%2Fphpdraft.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FSMillerDev%2Fphpdraft?ref=badge_shield)\n\nThis is a parser for API Blueprint files in PHP.[1](#dependencies)\n\n## Dependencies\nPHPDraft requires [drafter](https://github.com/apiaryio/drafter) to be installed. Refer to the drafter page for the installation details. If you don't want to install drafter, you can pass `-o` to the command to make it use [https://api.apiblueprint.org/parser](https://api.apiblueprint.org/parser)\n\n## Usage\nRequires PHP 8.1+ to run. Unittests require runkit or uopz\nFor direct usage you can run:\n```bash\n$ ./phpdraft.phar -f blueprint-file.apib \u003e blueprint-webpage.html\n```\nYou can also install it first:\n```bash\n$ cp phpdraft.phar /usr/bin/phpdraft\n$ chmod +x /usr/bin/phpdraft\n$ phpdraft -f blueprint-file.apib \u003e blueprint-webpage.html\n```\n\n## Extra features\nWe got some fun stuff, check the [wiki](https://github.com/SMillerDev/phpdraft/wiki) for more.\n\n## Writing API documentation\n\nFor writing API documentation using [API Blueprint](http://apiblueprint.org/) syntax. You can read about its [specification](https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md).\n\nHere's the example:\n\n```markdown\nFORMAT: 1A\nHOST: https://api.example.com/v1\n\n# Hello API\n\nA simple API demo\n\n# Group People\n\nThis section describes about the People\n\n## Person [/people/{id}]\n\nRepresent particular Person\n\n+ Parameters\n\n    + id (required, string, `123`) ... The id of the Person.\n\n+ Model (application/json)\n\n    ```\n    {\"name\":\"Gesang\",\"birthdate\":\"01-09-1917\"}\n    ```\n\n### Retrieve Person [GET]\n\nReturn the information for the Person\n\n+ Request (application/json)\n\n    + Headers\n\n        ```\n        Authorization: Basic AbcdeFg=\n        ```\n\n+ Response 200 (application/json)\n\n    [Person][]\n\n```\n\n## Building an executable\nInstall the binary dependencies with composer (`composer install`).\nRun `phing phar` or `phing phar-nightly`\n\n## Libraries\nThis app usage the following libraries:\n* https://github.com/michelf/php-markdown.git\n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSMillerDev%2Fphpdraft.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FSMillerDev%2Fphpdraft?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmillerdev%2Fphpdraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmillerdev%2Fphpdraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmillerdev%2Fphpdraft/lists"}