content: package com.seasonthon.everflow.app.global.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 java.util.ArrayList;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.http.MediaType;
  import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
  
  @Configuration
  public class SwaggerConfig {
  
      public SwaggerConfig(MappingJackson2HttpMessageConverter converter) {
          var supportedMediaTypes = new ArrayList<>(converter.getSupportedMediaTypes());
          supportedMediaTypes.add(new MediaType("application", "octet-stream"));
          converter.setSupportedMediaTypes(supportedMediaTypes);
      }
  
      @Bean
      public OpenAPI openAPI() {
          String jwt = "Authorization";
          SecurityRequirement securityRequirement = new SecurityRequirement().addList(jwt);
          Components components = new Components().addSecuritySchemes(jwt, new SecurityScheme()
                  .name(jwt)
                  .type(SecurityScheme.Type.HTTP)
                  .scheme("bearer")
                  .bearerFormat("JWT")
          );
          return new OpenAPI()
                  .components(components)
                  .info(apiInfo())
                  .addSecurityItem(securityRequirement);
      }
      private Info apiInfo() {
          return new Info()
                  .title("Everflow BACKEND SERVER")
                  .description("Everflow API swagger page")
                  .version("1.0.2");
      }
  }
  