mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Merge pull request #654 from mRoca/master
DunglasApiBundle : Add doc sections
This commit is contained in:
commit
7c8b010215
@ -114,6 +114,7 @@ class DunglasApiProvider implements AnnotationsProviderInterface
|
||||
'resource' => $route->getPath(),
|
||||
'description' => $operationHydraDoc['hydra:title'],
|
||||
'resourceDescription' => $resourceHydraDoc['hydra:title'],
|
||||
'section' => $resourceHydraDoc['hydra:title'],
|
||||
];
|
||||
|
||||
$entityClass = $resource->getEntityClass();
|
||||
|
@ -27,6 +27,90 @@ class MarkdownFormatterTest extends WebTestCase
|
||||
|
||||
if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) {
|
||||
$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 ##
|
||||
|
||||
### `GET` /api/other-resources.{_format} ###
|
||||
@ -670,87 +754,6 @@ _This method is useful to test if the getDocComment works._
|
||||
- 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 ###
|
||||
|
||||
|
||||
|
@ -1634,6 +1634,7 @@ And, it supports multilines until the first \'@\' char.',
|
||||
),
|
||||
'deprecated' => false,
|
||||
'resourceDescription' => 'Popo',
|
||||
'section' => 'Popo',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
@ -1668,6 +1669,7 @@ And, it supports multilines until the first \'@\' char.',
|
||||
),
|
||||
'deprecated' => false,
|
||||
'resourceDescription' => 'Popo',
|
||||
'section' => 'Popo',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
@ -1701,6 +1703,7 @@ And, it supports multilines until the first \'@\' char.',
|
||||
),
|
||||
'deprecated' => false,
|
||||
'resourceDescription' => 'Popo',
|
||||
'section' => 'Popo',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
@ -1744,6 +1747,7 @@ And, it supports multilines until the first \'@\' char.',
|
||||
),
|
||||
'deprecated' => false,
|
||||
'resourceDescription' => 'Popo',
|
||||
'section' => 'Popo',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
@ -1767,6 +1771,7 @@ And, it supports multilines until the first \'@\' char.',
|
||||
),
|
||||
'deprecated' => false,
|
||||
'resourceDescription' => 'Popo',
|
||||
'section' => 'Popo',
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
|
Loading…
x
Reference in New Issue
Block a user