Skip to content

Commit

Permalink
new-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eylulozatman committed Nov 23, 2023
1 parent 439e26b commit 6d4a3e8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/main/java/airline/airlinemidterm4458/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
package airline.airlinemidterm4458.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.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Collections;

@Configuration
public class SwaggerConfig {

Expand All @@ -18,4 +25,22 @@ public GroupedOpenApi customApi() {
.build();
}

@Bean
public OpenAPI openApiConfiguration() {
return new OpenAPI()
.components(new Components()
.addSecuritySchemes("bearer-key", new SecurityScheme()
.type(SecurityScheme.Type.HTTP)
.scheme("bearer")
.bearerFormat("JWT")
)
)
.info(new Info()
.title("AIRLİNE PROJECT")
.version("1.0.0")
.description("Project Api")
);

}

}

0 comments on commit 6d4a3e8

Please sign in to comment.