Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,16 @@ Scenario: must show Swagger UI page for External V2 APIs
And a call [to observe the swagger json content] will get the expected response as in [S-125_Swagger_JSON_V2_External].

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@S-125.5
Scenario: must show Swagger Config JSON Page

Given an appropriate test context as detailed in the test data source,

When a request is prepared with appropriate values,
And it is submitted to call the [Get Swagger Config JSON Page] operation of [CCD Data Store],

Then a positive response is received,
And the response has all the details as expected
And a call [to observe the swagger config json content] will get the expected response as in [S-125.5].

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"_guid_": "F-125_Test_Swagger_Config_Base_Data",
"title": "Verify swagger Config",

"productName": "CCD Data Store",
"operationName": "Get Swagger Config JSON Page",

"method": "GET",
"uri": "/v2/api-docs/swagger-config",

"expectedResponse": {
"responseCode" : 200,
"responseMessage" : "OK",
"headers" : {
"Accept-Ranges" : "bytes",
"Content-Encoding" : "gzip",
"Content-Type" : "application/json"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"_guid_": "S-125.5",
"title": "Must return a positive appropriate response when Swagger config URL is accessed",
"_extends_": "F-125_Test_Swagger_Config_Base_Data",

"specs": [
"to observe the swagger config json content"
],

"request" :{
},

"expectedResponse": {
"body" : {
"configUrl" : "[[ANYTHING_PRESENT]]",
"url" : "[[ANYTHING_PRESENT]]",
"oauth2RedirectUrl" : "[[ANYTHING_PRESENT]]",
"validatorUrl" : "[[ANYTHING_PRESENT]]"
}
}
}
2 changes: 2 additions & 0 deletions src/main/java/uk/gov/hmcts/ccd/SecurityConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
"/swagger-resources/**",
"/swagger-ui/**",
"/webjars/**",
"/v2/api-docs",
"/v2/api-docs/**",
"/testing-support/cleanup-case-type/**"
};

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
server.port=4452

springdoc.swagger-ui.config-url=/v2/api-docs

server.servlet.contextPath=
server.compression.enabled=true
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain
Expand Down