mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Add DunglasApiBundle doc sections
This commit is contained in:
parent
a05ed38501
commit
65345912a9
@ -114,6 +114,7 @@ class DunglasApiProvider implements AnnotationsProviderInterface
|
|||||||
'resource' => $route->getPath(),
|
'resource' => $route->getPath(),
|
||||||
'description' => $operationHydraDoc['hydra:title'],
|
'description' => $operationHydraDoc['hydra:title'],
|
||||||
'resourceDescription' => $resourceHydraDoc['hydra:title'],
|
'resourceDescription' => $resourceHydraDoc['hydra:title'],
|
||||||
|
'section' => $resourceHydraDoc['hydra:title'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$entityClass = $resource->getEntityClass();
|
$entityClass = $resource->getEntityClass();
|
||||||
|
@ -27,6 +27,90 @@ class MarkdownFormatterTest extends WebTestCase
|
|||||||
|
|
||||||
if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) {
|
if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) {
|
||||||
$expected = <<<MARKDOWN
|
$expected = <<<MARKDOWN
|
||||||
|
# Popo #
|
||||||
|
|
||||||
|
### `GET` /popos ###
|
||||||
|
|
||||||
|
_Retrieves the collection of Popo resources._
|
||||||
|
|
||||||
|
#### Response ####
|
||||||
|
|
||||||
|
foo:
|
||||||
|
|
||||||
|
* type: string
|
||||||
|
|
||||||
|
|
||||||
|
### `POST` /popos ###
|
||||||
|
|
||||||
|
_Creates a Popo resource._
|
||||||
|
|
||||||
|
#### Parameters ####
|
||||||
|
|
||||||
|
foo:
|
||||||
|
|
||||||
|
* type: string
|
||||||
|
* required: false
|
||||||
|
|
||||||
|
#### Response ####
|
||||||
|
|
||||||
|
foo:
|
||||||
|
|
||||||
|
* type: string
|
||||||
|
|
||||||
|
|
||||||
|
### `GET` /popos/{id} ###
|
||||||
|
|
||||||
|
_Retrieves Popo resource._
|
||||||
|
|
||||||
|
#### Requirements ####
|
||||||
|
|
||||||
|
**id**
|
||||||
|
|
||||||
|
- Type: int
|
||||||
|
|
||||||
|
#### Response ####
|
||||||
|
|
||||||
|
foo:
|
||||||
|
|
||||||
|
* type: string
|
||||||
|
|
||||||
|
|
||||||
|
### `PUT` /popos/{id} ###
|
||||||
|
|
||||||
|
_Replaces the Popo resource._
|
||||||
|
|
||||||
|
#### Requirements ####
|
||||||
|
|
||||||
|
**id**
|
||||||
|
|
||||||
|
- Type: string
|
||||||
|
|
||||||
|
#### Parameters ####
|
||||||
|
|
||||||
|
foo:
|
||||||
|
|
||||||
|
* type: string
|
||||||
|
* required: false
|
||||||
|
|
||||||
|
#### Response ####
|
||||||
|
|
||||||
|
foo:
|
||||||
|
|
||||||
|
* type: string
|
||||||
|
|
||||||
|
|
||||||
|
### `DELETE` /popos/{id} ###
|
||||||
|
|
||||||
|
_Deletes the Popo resource._
|
||||||
|
|
||||||
|
#### Requirements ####
|
||||||
|
|
||||||
|
**id**
|
||||||
|
|
||||||
|
- Type: string
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## /api/other-resources ##
|
## /api/other-resources ##
|
||||||
|
|
||||||
### `GET` /api/other-resources.{_format} ###
|
### `GET` /api/other-resources.{_format} ###
|
||||||
@ -670,87 +754,6 @@ _This method is useful to test if the getDocComment works._
|
|||||||
- Description: The param id
|
- Description: The param id
|
||||||
|
|
||||||
|
|
||||||
### `GET` /popos ###
|
|
||||||
|
|
||||||
_Retrieves the collection of Popo resources._
|
|
||||||
|
|
||||||
#### Response ####
|
|
||||||
|
|
||||||
foo:
|
|
||||||
|
|
||||||
* type: string
|
|
||||||
|
|
||||||
|
|
||||||
### `POST` /popos ###
|
|
||||||
|
|
||||||
_Creates a Popo resource._
|
|
||||||
|
|
||||||
#### Parameters ####
|
|
||||||
|
|
||||||
foo:
|
|
||||||
|
|
||||||
* type: string
|
|
||||||
* required: false
|
|
||||||
|
|
||||||
#### Response ####
|
|
||||||
|
|
||||||
foo:
|
|
||||||
|
|
||||||
* type: string
|
|
||||||
|
|
||||||
|
|
||||||
### `GET` /popos/{id} ###
|
|
||||||
|
|
||||||
_Retrieves Popo resource._
|
|
||||||
|
|
||||||
#### Requirements ####
|
|
||||||
|
|
||||||
**id**
|
|
||||||
|
|
||||||
- Type: int
|
|
||||||
|
|
||||||
#### Response ####
|
|
||||||
|
|
||||||
foo:
|
|
||||||
|
|
||||||
* type: string
|
|
||||||
|
|
||||||
|
|
||||||
### `PUT` /popos/{id} ###
|
|
||||||
|
|
||||||
_Replaces the Popo resource._
|
|
||||||
|
|
||||||
#### Requirements ####
|
|
||||||
|
|
||||||
**id**
|
|
||||||
|
|
||||||
- Type: string
|
|
||||||
|
|
||||||
#### Parameters ####
|
|
||||||
|
|
||||||
foo:
|
|
||||||
|
|
||||||
* type: string
|
|
||||||
* required: false
|
|
||||||
|
|
||||||
#### Response ####
|
|
||||||
|
|
||||||
foo:
|
|
||||||
|
|
||||||
* type: string
|
|
||||||
|
|
||||||
|
|
||||||
### `DELETE` /popos/{id} ###
|
|
||||||
|
|
||||||
_Deletes the Popo resource._
|
|
||||||
|
|
||||||
#### Requirements ####
|
|
||||||
|
|
||||||
**id**
|
|
||||||
|
|
||||||
- Type: string
|
|
||||||
|
|
||||||
|
|
||||||
### `ANY` /return-nested-output ###
|
### `ANY` /return-nested-output ###
|
||||||
|
|
||||||
|
|
||||||
|
@ -1634,6 +1634,7 @@ And, it supports multilines until the first \'@\' char.',
|
|||||||
),
|
),
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'resourceDescription' => 'Popo',
|
'resourceDescription' => 'Popo',
|
||||||
|
'section' => 'Popo',
|
||||||
),
|
),
|
||||||
8 =>
|
8 =>
|
||||||
array (
|
array (
|
||||||
@ -1668,6 +1669,7 @@ And, it supports multilines until the first \'@\' char.',
|
|||||||
),
|
),
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'resourceDescription' => 'Popo',
|
'resourceDescription' => 'Popo',
|
||||||
|
'section' => 'Popo',
|
||||||
),
|
),
|
||||||
9 =>
|
9 =>
|
||||||
array (
|
array (
|
||||||
@ -1701,6 +1703,7 @@ And, it supports multilines until the first \'@\' char.',
|
|||||||
),
|
),
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'resourceDescription' => 'Popo',
|
'resourceDescription' => 'Popo',
|
||||||
|
'section' => 'Popo',
|
||||||
),
|
),
|
||||||
10 =>
|
10 =>
|
||||||
array (
|
array (
|
||||||
@ -1744,6 +1747,7 @@ And, it supports multilines until the first \'@\' char.',
|
|||||||
),
|
),
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'resourceDescription' => 'Popo',
|
'resourceDescription' => 'Popo',
|
||||||
|
'section' => 'Popo',
|
||||||
),
|
),
|
||||||
11 =>
|
11 =>
|
||||||
array (
|
array (
|
||||||
@ -1767,6 +1771,7 @@ And, it supports multilines until the first \'@\' char.',
|
|||||||
),
|
),
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'resourceDescription' => 'Popo',
|
'resourceDescription' => 'Popo',
|
||||||
|
'section' => 'Popo',
|
||||||
),
|
),
|
||||||
12 =>
|
12 =>
|
||||||
array (
|
array (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user