/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.4-dev * User agent: apibuilder app.apibuilder.io/michal/playground-api/0.0.4-dev/flow_erm_schema */ package io.github.mkows.playground.api.v0.erm import io.flow.event.relation.mapper.schema.ErmSpec import io.apibuilder.spec.v0.models.{Enum, EnumValue, Field, Model, Union, UnionType} import io.github.mkows.playground.api.v0.models.Error import io.github.mkows.playground.api.v0.models.Healthcheck import io.github.mkows.playground.api.v0.models.ItemState object GeneratedErmSchema { implicit lazy val ermSpecError: ErmSpec[Error] = ErmSpec.model( qualifiedName = "io.github.mkows.playground.api.v0.models.error", spec = Model(name = "error", plural = "errors", fields = Seq( Field(name = "code", `type` = "integer", required = true), Field(name = "message", `type` = "string", required = true), Field(name = "message_code", `type` = "string", required = true), Field(name = "message_lengthy", `type` = "string", required = true), Field(name = "details", `type` = "string", required = false), )), ) implicit lazy val ermSpecHealthcheck: ErmSpec[Healthcheck] = ErmSpec.model( qualifiedName = "io.github.mkows.playground.api.v0.models.healthcheck", spec = Model(name = "healthcheck", plural = "healthchecks", fields = Seq( Field(name = "status", `type` = "string", required = true), Field(name = "created_at", `type` = "date-time-iso8601", required = true), )), ) implicit lazy val ermSpecItemState: ErmSpec[ItemState] = ErmSpec.union( qualifiedName = "io.github.mkows.playground.api.v0.unions.item_state", spec = Union(name = "item_state", plural = "item_states", discriminator = Some("type"), types = Seq( UnionType(`type` = "item_state_progress", discriminatorValue = Some("item_state_progress")), UnionType(`type` = "item_state_failed_cause", discriminatorValue = Some("item_state_failed_cause")), )), ) val all: Seq[ErmSpec[_]] = Seq( ermSpecError, ermSpecHealthcheck, ermSpecItemState, ) }