@@ -154,7 +154,7 @@ class Product // The class name will be used to name exposed resources
154
154
*
155
155
* @ApiProperty(
156
156
* attributes={
157
- * "swagger_context "={"type"="string", "format"="date-time"}
157
+ * "openapi_context "={"type"="string", "format"="date-time"}
158
158
* }
159
159
* )
160
160
*/
@@ -171,13 +171,13 @@ resources:
171
171
properties :
172
172
name :
173
173
attributes :
174
- swagger_context :
174
+ openapi_context :
175
175
type : string
176
176
enum : ['one', 'two']
177
177
example : one
178
178
timestamp :
179
179
attributes :
180
- swagger_context :
180
+ openapi_context :
181
181
type : string
182
182
format : date-time
183
183
` ` `
@@ -190,7 +190,7 @@ resources:
190
190
https://api-platform.com/schema/metadata/metadata-2.0.xsd">
191
191
<resource class="App\Entity\Product">
192
192
<property name="name">
193
- <attribute name="swagger_context ">
193
+ <attribute name="openapi_context ">
194
194
<attribute name="type">type</attribute>
195
195
<attribute name="enum">
196
196
<attribute>one</attribute>
@@ -200,7 +200,7 @@ resources:
200
200
</attribute>
201
201
</property>
202
202
<property name="timestamp">
203
- <attribute name="swagger_context ">
203
+ <attribute name="openapi_context ">
204
204
<attribute name="type">string</attribute>
205
205
<attribute name="format">date-time</attribute>
206
206
</attribute>
@@ -301,8 +301,8 @@ resources:
301
301
method : get
302
302
path : ' /rabbit/rand'
303
303
controller : App\Controller\RandomRabbit
304
- # if you are using OpenApi V3 use 'openapi_context ' instead of 'swagger_context '
305
- swagger_context :
304
+ # if you are using OpenApi V2 instead of V3 use 'swagger_context ' instead of 'openapi_context '
305
+ openapi_context :
306
306
summary : Random rabbit picture
307
307
description : >
308
308
# Pop a great rabbit picture by color!
@@ -334,8 +334,8 @@ resources:
334
334
<attribute name="method">get</attribute>
335
335
<attribute name="path">/rabbit/rand</attribute>
336
336
<attribute name="controller">App\Controller\RandomRabbit</attribute>
337
- <!-- if you are using OpenApi V3 use 'openapi_context ' instead of 'swagger_context ' -->
338
- <attribute name="swagger_context ">
337
+ <!-- if you are using OpenApi V2 instead of V3 use 'swagger_context ' instead of 'openapi_context ' -->
338
+ <attribute name="openapi_context ">
339
339
<attribute name="summary">Random rabbit picture</attribute>
340
340
<attribute name="description">
341
341
# Pop a great rabbit picture by color!
0 commit comments