Skip to content

Commit 3af0823

Browse files
authored
Swagger ApiProperty variable should not be quoted
When copying/pasting the annotation from the current doc we got ```[Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_IDENTIFIER, got 'attributes' at position 48 in property AppBundle\Entity\UserPortfolioAudit::$pfType.```
1 parent f2da9b7 commit 3af0823

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/swagger.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ final class SwaggerDecorator implements NormalizerInterface
5353

5454

5555
// e.g. add a custom parameter
56-
$docs['paths']['/foos']['get']['parameters'][] = $customDefinition;
56+
$docs['paths']['/foos']['get']['parameters'][] = $customDefinition;
5757

58-
// Override title
59-
$docs['info']['title'] = 'My Api Foo';
58+
// Override title
59+
$docs['info']['title'] = 'My Api Foo';
6060

6161
return $docs;
6262
}
@@ -104,7 +104,7 @@ class Product // The class name will be used to name exposed resources
104104
* @Assert\NotBlank
105105
*
106106
* @ApiProperty(
107-
* "attributes"={
107+
* attributes={
108108
* "swagger_context"={
109109
* "type"="string",
110110
* "enum"={"one", "two"},
@@ -120,7 +120,7 @@ class Product // The class name will be used to name exposed resources
120120
* @Assert\DateTime
121121
*
122122
* @ApiProperty(
123-
* "attributes"={
123+
* attributes={
124124
* "swagger_context"={"type"="string", "format"="date-time"}
125125
* }
126126
* )

0 commit comments

Comments
 (0)