This repository has been archived by the owner on Nov 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f56cbc1
commit 0f2c48e
Showing
10 changed files
with
43 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/net/NetUtils.kt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/net/SocketType.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,11 @@ import org.springframework.web.multipart.MultipartFile | |
import reactor.core.publisher.Flux | ||
import reactor.core.publisher.Mono | ||
import springfox.documentation.builders.ApiInfoBuilder | ||
import springfox.documentation.builders.RequestHandlerSelectors.basePackage | ||
import springfox.documentation.schema.AlternateTypeRules.newRule | ||
import springfox.documentation.service.Contact | ||
import springfox.documentation.service.SecurityScheme | ||
import springfox.documentation.spi.DocumentationType.SWAGGER_2 | ||
import springfox.documentation.spi.service.contexts.SecurityContext | ||
import springfox.documentation.spring.web.plugins.Docket | ||
import kotlin.coroutines.Continuation | ||
|
@@ -37,11 +39,19 @@ import kotlin.coroutines.Continuation | |
* @author sokomishalov | ||
*/ | ||
|
||
const val SWAGGER_UI_PAGE = "swagger-ui.html" | ||
const val SWAGGER_UI_PAGE = "/swagger-ui/" | ||
const val REDIRECT_TO_SWAGGER = "redirect:${SWAGGER_UI_PAGE}" | ||
private val DEFAULT_AUTHOR = Contact("Sokolov Mikhael", "https://sokomishalov.github.io/about-me", "[email protected]") | ||
private val TYPE_RESOLVER = TypeResolver() | ||
|
||
inline fun <reified T : Any> initDocket(): Docket { | ||
return Docket(SWAGGER_2) | ||
.select() | ||
.apis(basePackage(T::class.java.`package`.name)) | ||
.paths { true } | ||
.build() | ||
} | ||
|
||
fun Docket.customize( | ||
securityContext: SecurityContext? = null, | ||
securityScheme: SecurityScheme? = null, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters