Skip to content

Commit

Permalink
[gen] benign code change to re-run CI after unrelated failure
Browse files Browse the repository at this point in the history
  • Loading branch information
hochgi committed May 17, 2024
1 parent 2f65fa4 commit fc51bd7
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import zio.Chunk
import zio.http.Method
import zio.http.endpoint.openapi.OpenAPI.ReferenceOr
import zio.http.endpoint.openapi.{JsonSchema, OpenAPI}
import zio.http.gen.scala.Code.ScalaType
import zio.http.gen.scala.{Code, CodeGen}

object EndpointGen {
Expand Down Expand Up @@ -899,7 +898,7 @@ final case class EndpointGen() {
.map(_.withoutAnnotations)
.flatMap(schemaToField(_, openAPI, "unused", annotations))
.map(_.fieldType)
.reduceLeft(ScalaType.Or(_, _))
.reduceLeft(Code.ScalaType.Or.apply)
Some(Code.Field(name, tpe))
case JsonSchema.AllOfSchema(_) =>
throw new Exception("Inline allOf schemas are not supported for fields")
Expand All @@ -909,7 +908,7 @@ final case class EndpointGen() {
.map(_.withoutAnnotations)
.flatMap(schemaToField(_, openAPI, "unused", annotations))
.map(_.fieldType)
.reduceLeft(ScalaType.Or(_, _))
.reduceLeft(Code.ScalaType.Or.apply)
Some(Code.Field(name, tpe))
case JsonSchema.Number(JsonSchema.NumberFormat.Double) =>
Some(Code.Field(name, Code.Primitive.ScalaDouble))
Expand All @@ -928,9 +927,9 @@ final case class EndpointGen() {
case JsonSchema.Enum(_) =>
Some(Code.Field(name, Code.TypeRef(name.capitalize)))
case JsonSchema.Null =>
Some(Code.Field(name, ScalaType.Unit))
Some(Code.Field(name, Code.ScalaType.Unit))
case JsonSchema.AnyJson =>
Some(Code.Field(name, ScalaType.JsonAST))
Some(Code.Field(name, Code.ScalaType.JsonAST))
}
}

Expand Down

0 comments on commit fc51bd7

Please sign in to comment.