Skip to content
Merged
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
10 changes: 6 additions & 4 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,10 @@ ResponseEntity<String> testme() {
```java
@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI().components(new Components().addSecuritySchemes("bearer-key",
new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("bearer").bearerFormat("JWT")));
return new OpenAPI()
.components(new Components()
.addSecuritySchemes("bearer-key",
new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("bearer").bearerFormat("JWT")));
}
```

Expand Down Expand Up @@ -366,15 +368,15 @@ public OpenAPI customOpenAPI() {
return new OpenAPI().components(new Components()
.addSecuritySchemes("basicScheme", new SecurityScheme()
.type(SecurityScheme.Type.HTTP).scheme("basic"))).info(new Info().title("Custom API")
.version("100")).addTagsItem(new Tag().name("mytag"));
.version("100")).addTagsItem(new Tag().name("mytag"));
}
```

### How is server url generated ?
- Generating automatically server url may be useful, if the documentation is not present.
- If the server annotations are present, they will be used instead.

###How can I expose the api-docs endpoints without using the `swagger-ui`?
### How can I expose the api-docs endpoints without using the `swagger-ui`?
- You should use the `springdoc-openapi-core` dependency only:

```xml
Expand Down