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
- There is no `springdoc-gradle-plugin` planned for short term.
140
140
141
141
### How can I hide a parameter from the documentation ?
@@ -171,7 +171,7 @@ The projects that uses `spring-data` should add this dependency together with th
171
171
```
172
172
173
173
- If you use Pageable in a GET HTTP method, you will have to declare the explicit mapping of Pageable fields as Query Params and add the @Parameter(hidden = true) Pageable pageable on your pageable parameter.
174
-
- You should also, declare the annotation `@PageableAsQueryParam` provided by springdoc on the method level, or declare your own if need to define your custom description, defaultvalue, ...
174
+
- You should also, declare the annotation `@PageableAsQueryParam` provided by springdoc on the method level, or declare your own if need to define your custom description, defaultValue, ...
175
175
- Since, v1.3.1 you can use as well `@ParameterObject` instead of `@PageableAsQueryParam` for HTTP `GET` methods.
176
176
177
177
@@ -196,10 +196,10 @@ public String toString() {
196
196
}
197
197
```
198
198
199
-
### Does it really support Spring Boot 2.2.x.RELEASE & Hateoas 1.0?
199
+
### Does it really support Spring Boot 2.2.x.RELEASE & HATEOAS 1.0?
200
200
- Yes
201
201
202
-
### How can I deploy the Doploy `springdoc-openapi-ui`, behind a reverse proxy?
202
+
### How can I deploy `springdoc-openapi-ui` behind a reverse proxy?
203
203
- If your application is running behind a proxy, a load-balancer or in the cloud, the request information (like the host, port, scheme…) might change along the way. Your application may be running on `10.10.10.10:8080`, but HTTP clients should only see `example.org`.
204
204
205
205
-[RFC7239 "Forwarded Headers"](https://tools.ietf.org/html/rfc7239) defines the Forwarded HTTP header; proxies can use this header to provide information about the original request. You can configure your application to read those headers and automatically use that information when creating links and sending them to clients in HTTP 302 responses, JSON documents or HTML pages. There are also non-standard headers, like `X-Forwarded-Host`, `X-Forwarded-Port`, `X-Forwarded-Proto`, `X-Forwarded-Ssl`, and `X-Forwarded-Prefix`.
- OAS 3 was released in July 2017, and there was no release of `springfox` to support OAS 3.
315
-
`springfox` covers for the moment only swagger 2 integration with Spring Boot. The lastest release date is june 2018. So, in terms of maintenance there is a big lack of support lately.
315
+
`springfox` covers for the moment only swagger 2 integration with Spring Boot. The latest release date is June 2018. So, in terms of maintenance there is a big lack of support lately.
316
316
317
317
- We decided to move forward and share the library that we already used on our internal projects, with the community.
318
318
- The biggest difference with `springfox`, is that we integrate new features not covered by `springfox`:
- There is no relation between `springdoc-openapi` and `springfox`.If you want to migrate to OpenAPI 3:
327
327
- Remove all the dependencies and the related code to springfox
328
328
- Add `springdoc-openapi-ui` dependency
329
-
- If you don't want to serve the ui from your root path or there is a conflict with an existing configuration, you can just change the following property:
329
+
- If you don't want to serve the UI from your root path or there is a conflict with an existing configuration, you can just change the following property:
- You may have global parameters with Standard OpenAPI description.
336
-
- If you need the defintions to appear globally (withing every group), no matter if the group fulfills the conditions specified on the GroupedOpenApi , you can use OpenAPI Bean.
336
+
- If you need the definitions to appear globally (within every group), no matter if the group fulfills the conditions specified on the GroupedOpenApi , you can use OpenAPI Bean.
337
337
- You can define common parameters under parameters in the global components section and reference them elsewhere via `$ref`. You can also define global header parameters.
338
338
- For this, you can override to OpenAPI Bean, and set the global headers or parameters definition on the components level.
339
339
```java
@@ -386,26 +386,26 @@ public OpenAPI customOpenAPI() {
### Can i use spring property with swagger annotations?
389
+
### Can I use spring property with swagger annotations?
390
390
- The support of spring property resolver for `@Info`: `title` - `description` - `version` - `termsOfService`
391
391
- The support of spring property resolver for `@Info.license`: `name` - `url`
392
392
- The support of spring property resolver for `@Info.contact`: `name` - `email` - `url`
393
393
- The support of spring property resolver for `@Operation`: `description` - `summary`
394
394
- The support of spring property resolver for `@Parameter`: `description` - `name`
395
395
- The support of spring property resolver for `@ApiResponse`: `description`
396
-
- Its also possible to declare security urls for `@OAuthFlow`: `openIdConnectUrl` - `authorizationUrl` - `refreshUrl` - `tokenUrl`
396
+
- Its also possible to declare security URLs for `@OAuthFlow`: `openIdConnectUrl` - `authorizationUrl` - `refreshUrl` - `tokenUrl`
397
397
- The support of spring property resolver for `@Schema`: `name` - `title` - `description` , by setting `springdoc.api-docs.resolve-schema-properties` to `true`
398
-
### How can i disable springdoc-openapi cache?
398
+
### How can I disable springdoc-openapi cache?
399
399
- By default, the OpenAPI description is calculated once, and then cached.
400
-
- Sometimes the same swagger-ui is served behind internal and external proxies. some users want the server url, to be computed on each http request.
400
+
- Sometimes the same swagger-ui is served behind internal and external proxies. some users want the server URL, to be computed on each http request.
401
401
- In order to disable springdoc cache, you will have to set the following property:
402
402
```properties
403
403
springdoc.cache.disabled= true
404
404
```
405
405
406
406
407
-
### How is server url generated ?
408
-
- Generating automatically server url may be useful, if the documentation is not present.
407
+
### How is server URL generated ?
408
+
- Generating automatically server URL may be useful, if the documentation is not present.
409
409
- If the server annotations are present, they will be used instead.
410
410
411
411
### How can I expose the api-docs endpoints without using the `swagger-ui`?
### What is the url of the `swagger-ui`, when I set a different context-path?
440
+
### What is the URL of the `swagger-ui`, when I set a different context-path?
441
441
442
442
- If you use different context-path:
443
443
```properties
444
444
server.servlet.context-path= /foo
445
445
```
446
-
- The `swagger-ui` will be available on the following url:
446
+
- The `swagger-ui` will be available on the following URL:
447
447
-http://server:port/foo/swagger-ui.html
448
448
449
449
### Can I customize OpenAPI object programmatically?
450
450
451
-
- You can Define your own OpenAPI Bean: If you need the defintions to appear globally (withing every group), no matter if the group fulfills the conditions specified on the GroupedOpenApi , you can use OpenAPI Bean.
451
+
- You can Define your own OpenAPI Bean: If you need the definitions to appear globally (within every group), no matter if the group fulfills the conditions specified on the GroupedOpenApi , you can use OpenAPI Bean.
452
452
453
453
```java
454
454
@Bean
@@ -460,7 +460,7 @@ public OpenAPI customOpenAPI(@Value("${springdoc.version}") String appVersion) {
- If you need the defintions to appear withing a specific group, and respect the conditions specified on the GroupedOpenApi, you can add OpenApiCustomiser to your GroupedOpenApi definition.
463
+
- If you need the definitions to appear within a specific group, and respect the conditions specified on the GroupedOpenApi, you can add OpenApiCustomiser to your GroupedOpenApi definition.
### How to Integrate Open API 3 with Spring project (not Spring Boot)?
566
+
When your application is using spring without (spring-boot), you need to add beans and auto-configuration that are natively provided in spring-boot.
567
+
568
+
For example, lets assume you want load the swagger-ui in spring-mvc application:
569
+
570
+
- You mainly, need to add the springdoc-openapi module
571
+
572
+
```xml
573
+
<dependency>
574
+
<groupId>org.springdoc</groupId>
575
+
<artifactId>springdoc-openapi-ui</artifactId>
576
+
<version>last.version</version>
577
+
</dependency>
578
+
```
579
+
580
+
- If you don't have the spring-boot and spring-boot-autoconfigure dependencies, you need to add them. And pay attention to the compatibility matrix, between you spring.version and spring-boot.version. For example, in this case (spring.version=5.1.12.RELEASE):
0 commit comments