You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### How can i agreagte external endpoints (exposing OPENAPI 3 spec) inside one single application?
667
+
The properties springdoc.swagger-ui.urls.*, are suitable to configure external (/v3/api-docs url).
668
+
For example if you want to agreagte all the endpoints of other services, inside one single application.
669
+
Don't forget that CORS needs to be enabled as well.
670
+
671
+
### How can use custom json/yml file instead of generated one ?
672
+
If your file open-api.json, contains the OpenAPI documentation in OpenAPI 3 format.
673
+
Then simply declare: The file name can be anything you want, from the moment your declaration is consistent yaml or json OpenAPI Spec.
674
+
```properties
675
+
springdoc.swagger-ui.url=/open-api.json
676
+
```
677
+
678
+
Then the file open-api.json, should be located in: src/main/resources/static
679
+
No additional configuration is needed.
680
+
681
+
### How can i enable CSRF support?
682
+
If you are using standard headers.(for example using spring-security headers)
683
+
If the CSRF Token is required, swagger-ui automatically sends the new XSRF-TOKEN during each HTTP REQUEST.
684
+
That said - if your XSRF-TOKEN isn't standards-based, you can use a requestInterceptor to manually capture and attach the latest xsrf token to requests programmatically via spring resource transformer:
### How can i disable the swagger-ui from loading twince?
715
+
You can try the following property (if not using Oauth): This resolves a bug on swagger-ui where it loads some resources twice if using configurl as query parameter.
Copy file name to clipboardExpand all lines: index.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ This is a community-based project, not maintained by the Spring Framework Contri
41
41
<dependency>
42
42
<groupId>org.springdoc</groupId>
43
43
<artifactId>springdoc-openapi-ui</artifactId>
44
-
<version>1.4.4</version>
44
+
<version>1.4.5</version>
45
45
</dependency>
46
46
```
47
47
* This step is optional: For custom path of the swagger documentation in HTML format, add a custom springdoc property, in your spring-boot configuration file:
* This step is optional: For custom path of the OpenAPI documentation in Json format, add a custom springdoc property, in your spring-boot configuration file:
* This step is optional: For custom path of the swagger documentation in HTML format, add a custom springdoc property, in your spring-boot configuration file:
@@ -235,7 +235,7 @@ This dependency enables the support of Spring Hateoas format.
Copy file name to clipboardExpand all lines: springdoc-properties.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ springdoc.remove-broken-reference-definitions | `true` | `Boolean`. To disable r
39
39
springdoc.writer-with-default-pretty-printer | `false` | `Boolean`. To enable pretty print of the OpenApi specification.
40
40
springdoc.model-converters.deprecating-converter.enabled | `true` | `Boolean`. To disable deprecating model converter.
41
41
springdoc.use-fqn | `false` | `Boolean`. To enable fully qualified names.
42
+
springdoc.show-login-endpoint | `false` | `Boolean`. To make spring security login-endpoint visible.
42
43
43
44
### swagger-ui properties
44
45
- The support of the swagger-ui properties is available on `springdoc-openapi`. See [Official documentation](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/).
0 commit comments