@@ -5,10 +5,11 @@ Feature: Documentation support
55
66 @createSchema
77 Scenario : Retrieve the OpenAPI documentation
8- Given I send a "GET" request to "/docs.json"
8+ Given I add "Accept" header equal to "application/vnd.openapi+json"
9+ And I send a "GET" request to "/docs"
910 Then the response status code should be 200
1011 And the response should be in JSON
11- And the header "Content-Type" should be equal to "application/json; charset=utf-8"
12+ And the header "Content-Type" should be equal to "application/vnd.openapi+ json; charset=utf-8"
1213 # Context
1314 And the JSON node "openapi" should be equal to "3.1.0"
1415 # Root properties
@@ -288,10 +289,11 @@ Feature: Documentation support
288289 And I should see text matching "openapi"
289290
290291 Scenario : OpenAPI extension properties is enabled in JSON docs
291- Given I send a "GET" request to "/docs.json"
292+ Given I add "Accept" header equal to "application/vnd.openapi+json"
293+ And I send a "GET" request to "/docs.jsonopenapi"
292294 Then the response status code should be 200
293295 And the response should be in JSON
294- And the header "Content-Type" should be equal to "application/json; charset=utf-8"
296+ And the header "Content-Type" should be equal to "application/vnd.openapi+ json; charset=utf-8"
295297 And the JSON node "paths./dummy_addresses.get.x-visibility" should be equal to "hide"
296298
297299 Scenario : OpenAPI UI is enabled for an arbitrary endpoint
@@ -302,21 +304,23 @@ Feature: Documentation support
302304
303305 @!mongodb
304306 Scenario : Retrieve the OpenAPI documentation with API Gateway compatibility
305- Given I send a "GET" request to "/docs.json?api_gateway=true"
307+ Given I add "Accept" header equal to "application/vnd.openapi+json"
308+ And I send a "GET" request to "/docs.jsonopenapi?api_gateway=true"
306309 Then the response status code should be 200
307310 And the response should be in JSON
308- And the header "Content-Type" should be equal to "application/json; charset=utf-8"
311+ And the header "Content-Type" should be equal to "application/vnd.openapi+ json; charset=utf-8"
309312 And the JSON node "basePath" should be equal to "/"
310313 And the JSON node "components.schemas.RamseyUuidDummy.properties.id.description" should be equal to "The dummy id."
311314 And the JSON node "components.schemas.RelatedDummy-barcelona" should not exist
312315 And the JSON node "components.schemas.RelatedDummybarcelona" should exist
313316
314317 @!mongodb
315318 Scenario : Retrieve the OpenAPI documentation to see if shortName property is used
316- Given I send a "GET" request to "/docs.json"
319+ Given I add "Accept" header equal to "application/vnd.openapi+json"
320+ And I send a "GET" request to "/docs.jsonopenapi"
317321 Then the response status code should be 200
318322 And the response should be in JSON
319- And the header "Content-Type" should be equal to "application/json; charset=utf-8"
323+ And the header "Content-Type" should be equal to "application/vnd.openapi+ json; charset=utf-8"
320324 And the OpenAPI class "Resource" exists
321325 And the OpenAPI class "ResourceRelated" exists
322326 And the "resourceRelated" property for the OpenAPI class "Resource" should be equal to:
@@ -348,7 +352,7 @@ Feature: Documentation support
348352 And the JSON node "info.description" should contain "Made with love"
349353 # Security Schemes
350354 And the JSON node "components.securitySchemes" should be equal to:
351- """
355+ """
352356 {
353357 "oauth": {
354358 "type": "oauth2",
@@ -383,10 +387,11 @@ Feature: Documentation support
383387
384388 @!mongodb
385389 Scenario : Retrieve the OpenAPI documentation for Entity Dto Wrappers
386- Given I send a "GET" request to "/docs.json"
390+ Given I add "Accept" header equal to "application/vnd.openapi+json"
391+ And I send a "GET" request to "/docs.jsonopenapi"
387392 Then the response status code should be 200
388393 And the response should be in JSON
389- And the header "Content-Type" should be equal to "application/json; charset=utf-8"
394+ And the header "Content-Type" should be equal to "application/vnd.openapi+ json; charset=utf-8"
390395 And the OpenAPI class "WrappedResponseEntity-read" exists
391396 And the "id" property exists for the OpenAPI class "WrappedResponseEntity-read"
392397 And the "id" property for the OpenAPI class "WrappedResponseEntity-read" should be equal to:
0 commit comments