All Downloads are FREE. Search and download functionalities are using the official Maven repository.

camundala.helper.openApi.OpenApiCreator.scala Maven / Gradle / Ivy

There is a newer version: 1.30.23
Show newest version
package camundala.helper.openApi

import io.swagger.parser.OpenAPIParser
import io.swagger.v3.oas.models.OpenAPI
import io.swagger.v3.parser.core.models.ParseOptions

import scala.jdk.CollectionConverters.*

case class OpenApiCreator()(using config: OpenApiConfig):

  lazy val create: ApiDefinition =
    bpmnCreator.create(openAPI)
  end create

  private lazy val bpmnCreator = BpmnCreator()

  private lazy val openAPI: OpenAPI = new OpenAPIParser().readLocation(
    config.openApiFile.toString,
    null,
    new ParseOptions()
  ).getOpenAPI

end OpenApiCreator




© 2015 - 2024 Weber Informatics LLC | Privacy Policy