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

spice.openapi.generator.OpenAPIGeneratorConfig.scala Maven / Gradle / Ivy

There is a newer version: 0.6.1
Show newest version
package spice.openapi.generator

/**
 * Configuration for generating code for OpenAPI
 *
 * @param baseNames the base names for polymorphic types since this information is lost in OpenAPI. For example:
 *                  "Animal" -> Set("Dog", "Cat")
 */
case class OpenAPIGeneratorConfig(baseNames: (String, Set[String])*) {
  lazy val baseForTypeMap: Map[String, String] = baseNames.flatMap {
    case (parent, children) => children.map { child =>
      child -> parent
    }
  }.toMap
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy