-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate employee-service from springfox to springdoc (#34)
- Loading branch information
1 parent
011b862
commit dd56f65
Showing
5 changed files
with
33 additions
and
105 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
26 changes: 26 additions & 0 deletions
26
server/src/main/kotlin/org/octopusden/employee/config/OpenApiConfig.kt
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.octopusden.employee.config | ||
|
||
import io.swagger.v3.oas.models.Components | ||
import io.swagger.v3.oas.models.OpenAPI | ||
import io.swagger.v3.oas.models.info.Info | ||
import io.swagger.v3.oas.models.security.SecurityRequirement | ||
import io.swagger.v3.oas.models.security.SecurityScheme | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class OpenApiConfig { | ||
|
||
@Bean | ||
fun springShopOpenAPI(): OpenAPI { | ||
val securitySchemeName = "bearerAuth" | ||
return OpenAPI().info(Info().title("Employee Service").description("Employee Service API")) | ||
.addSecurityItem(SecurityRequirement().addList(securitySchemeName)).components( | ||
Components().addSecuritySchemes( | ||
securitySchemeName, | ||
SecurityScheme().name(securitySchemeName).type(SecurityScheme.Type.HTTP).scheme("bearer") | ||
.bearerFormat("JWT") | ||
) | ||
) | ||
} | ||
} |
102 changes: 0 additions & 102 deletions
102
server/src/main/kotlin/org/octopusden/employee/config/SwaggerConfig.kt
This file was deleted.
Oops, something went wrong.