You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where t1, t2 are e.g. enums or models or primitive types.
However, then when Scala code is generated (Play, http4s), it fails with Generator failed with HTTP 500: Unsupported response code[500]. Expected: 200, 409.
15:12:29.513 [application-akka.actor.default-dispatcher-3] ERROR application - java.lang.RuntimeException: illegal container type List(Enum(Namespaces(io.github.mkows.playground.api.v0),ItemStateFailedCause)) encountered in union [item_state_failed_cause]
java.lang.RuntimeException: illegal container type List(Enum(Namespaces(io.github.mkows.playground.api.v0),ItemStateFailedCause)) encountered in union [item_state_failed_cause]
at scala.sys.package$.error(package.scala:30)
at scala.generator.ScalaUnionType$.apply(ScalaService.scala:185)
at scala.generator.ScalaUnion.$anonfun$types$1(ScalaService.scala:125)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237)
at scala.collection.Iterator.foreach(Iterator.scala:941)
at scala.collection.Iterator.foreach$(Iterator.scala:941)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
at scala.collection.IterableLike.foreach(IterableLike.scala:74)
at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
at scala.collection.TraversableLike.map(TraversableLike.scala:237)
at scala.collection.TraversableLike.map$(TraversableLike.scala:230)
at scala.collection.AbstractTraversable.map(Traversable.scala:108)
at scala.generator.ScalaUnion.<init>(ScalaService.scala:125)
at scala.generator.ScalaService.$anonfun$unions$2(ScalaService.scala:36)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237)
(btw. prev version w/o an array union type works just fine 0.0.2-dev).
Currently the below api.json definition is accepted by apibuilder:
where
t1
,t2
are e.g. enums or models or primitive types.However, then when Scala code is generated (Play, http4s), it fails with
Generator failed with HTTP 500: Unsupported response code[500]. Expected: 200, 409
.Reproduced locally for
https://app.apibuilder.io/michal/playground-api/0.0.3-dev
and the stack trace is
(btw. prev version w/o an array union type works just fine
0.0.2-dev
).Docs:
https://app.apibuilder.io/doc/apiJson#union says for
Union Type > type
So complex type (collection, map) such be rejected (as per current apibuilder docs) when such api.json is uploaded.
The text was updated successfully, but these errors were encountered: