Skip to content

Commit

Permalink
Enhance swagger-ui url, disable validation by default, post 1.6.0. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bnasslahsen committed Dec 16, 2021
1 parent 3e8227c commit 5311835
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected String addParameters(String html) throws JsonProcessingException {
.filter(entry -> !SwaggerUiConfigParameters.OAUTH2_REDIRECT_URL_PROPERTY.equals(entry.getKey()))
.filter(entry -> !SwaggerUiConfigParameters.URL_PROPERTY.equals(entry.getKey()))
.filter(entry -> !SwaggerUiConfigParameters.URLS_PROPERTY.equals(entry.getKey()))
.filter(entry -> StringUtils.isNotEmpty((String) entry.getValue()))
.filter(entry -> SwaggerUiConfigParameters.VALIDATOR_URL_PROPERTY.equals(entry.getKey()) || StringUtils.isNotEmpty((String) entry.getValue()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,(e1, e2) -> e2,
LinkedHashMap::new));

Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app1
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/context-path/servlet-path/v3/api-docs/swagger-config"
"configUrl" : "/context-path/servlet-path/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app1-prefix
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/documentation/v3/api-docs/swagger-config"
"configUrl" : "/documentation/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app10
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app12
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ presets: [
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app21
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/rest/v3/api-docs/swagger-config"
"configUrl" : "/rest/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app24
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/foo/bar"
"configUrl" : "/foo/bar",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app26
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
layout: "BaseLayout" ,

"configUrl" : "/v3/api-docs/swagger-config",
"layout" : "BaseLayout"
"layout" : "BaseLayout",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app28
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config",
"filter" : "false"
"filter" : "false",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app5
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/context-path/v3/api-docs/swagger-config"
"configUrl" : "/context-path/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/context-path/servlet-path/v3/api-docs/swagger-config"
"configUrl" : "/context-path/servlet-path/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app7
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
3 changes: 2 additions & 1 deletion springdoc-openapi-ui/src/test/resources/results/app9
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/foo/bar"
"configUrl" : "/foo/bar",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config",
"filter" : "false"
"filter" : "false",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
layout: "BaseLayout" ,

"configUrl" : "/v3/api-docs/swagger-config",
"layout" : "BaseLayout"
"layout" : "BaseLayout",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/documentation/v3/api-docs/swagger-config"
"configUrl" : "/documentation/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
layout: "StandaloneLayout" ,

"configUrl" : "/v3/api-docs/swagger-config"
"configUrl" : "/v3/api-docs/swagger-config",
"validatorUrl" : ""

});
// End Swagger UI call region
Expand Down

0 comments on commit 5311835

Please sign in to comment.