1. Go to this page and download the library: Download gollumsf/rest-doc-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use GollumSF\RestDocBundle\Annotation\ApiDescribe;
#[ApiDescribe(entity: Book::class, serializeGroups: ['book_get'])]
public function list() { ... }
use GollumSF\RestDocBundle\Annotation\ApiEntity;
#[ApiEntity(description: 'A book entity', url: '/api/books')]
class Book {
// ...
}
use GollumSF\RestDocBundle\Annotation\ApiProperty;
class Book {
#[ApiProperty(type: 'integer')]
private int $id;
#[ApiProperty(type: 'string')]
private string $title;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.