mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Unified data types [actualType and subType] Updated tests. JMS parsing fixes; updated {Validator,FormType}Parser, FOSRestHandler, and AbstractFormatter, and updated DataTypes enum. Modified dataType checking. Updated tests. Updated DataTypes enum. Quick fix and added doc comments. CS fixes. Refactored FormTypeParser to produce nested parameters. Updated tests accordingly. Logical and CS fixes. Sub-forms and more tests. Logical and CS fixes. Swagger support: created formatter. Configuration and resourcePath logic update. ApiDoc annotation update. Updated formatter and added tests. Parameter formatting. Added tests for SwaggerFormatter. Added option in annotation, and the corresponding logic for parsing the supplied values and processing them in the formatter. Routing update. Updated tests. Removed unused dependency and updated doc comments. Renamed 'responseModels' to 'responseMap' Update the resource filtering and formatting of response messages. Updated check for 200 response model. Ignore data_class and always use form-type to avoid conflicts. Fix: add 'type' even if '' is specified. Refactored responseMap; added parsedResponseMap. Added tests and updated some. Fix: add 'type' even if '' is specified. Initial commit of command. Finished logic for dumping files. Updated doc comment; added license and added more meaningful class comment. Array of models support.
85 lines
1.7 KiB
PHP
85 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: bezalelhermoso
|
|
* Date: 6/20/14
|
|
* Time: 3:21 PM
|
|
*/
|
|
|
|
namespace Nelmio\ApiDocBundle\Tests\Fixtures\Controller;
|
|
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
|
|
|
|
|
/**
|
|
* Class ResourceController
|
|
*
|
|
* @package Nelmio\ApiDocBundle\Tests\Fixtures\Controller
|
|
* @author Bez Hermoso <bez@activelamp.com>
|
|
*/
|
|
class ResourceController
|
|
{
|
|
/**
|
|
* @ApiDoc(
|
|
* resource=true,
|
|
* resourceDescription="Operations on resource.",
|
|
* description="List resources.",
|
|
* statusCodes={200 = "Returned on success.", 404 = "Returned if resource cannot be found."}
|
|
* )
|
|
*/
|
|
public function listResourcesAction()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @ApiDoc(description="Retrieve a resource by ID.")
|
|
*/
|
|
public function getResourceAction()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @ApiDoc(description="Delete a resource by ID.")
|
|
*/
|
|
public function deleteResourceAction()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @ApiDoc(
|
|
* description="Create a new resource.",
|
|
* input={"class" = "Nelmio\ApiDocBundle\Tests\Fixtures\Form\SimpleType", "name" = ""},
|
|
* output="Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested"
|
|
* )
|
|
*/
|
|
public function createResourceAction()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @ApiDoc(resource=true, description="List another resource.", resourceDescription="Operations on another resource.")
|
|
*/
|
|
public function listAnotherResourcesAction()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @ApiDoc(description="Retrieve another resource by ID.")
|
|
*/
|
|
public function getAnotherResourceAction()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @ApiDoc(description="Update a resource bu ID.")
|
|
*/
|
|
public function updateAnotherResourceAction()
|
|
{
|
|
|
|
}
|
|
} |