PHP code example of vodevel / api-doc-bundle-type-describer
1. Go to this page and download the library: Download vodevel/api-doc-bundle-type-describer 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/ */
vodevel / api-doc-bundle-type-describer example snippets
class Controller {
#[Route('api/example', methods: ['POST'])]
#[RequestBody(content: new Model(type: ExampleRequest::class))]
#[Response(
response: 200,
description: '',
content: new Model(type: ExampleResponse::class),
)]
#[Tag(name: 'example')]
public function exampleMethod(ExampleRequest $request): ExampleResponse {
return new ExampleResponse();
}
}
class Controller {
#[Route('api/special', methods: ['POST'])]
#[Tag(name: 'example')]
public function exampleMethod(ExampleRequest $request): ExampleResponse {
return new ExampleResponse();
}
}
#[RequestBody]
class SpecialPointRequest {}
#[Response]
class SpecialPointResponse {}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.