-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix OpenApi gen components from case class with arity > 22 (#3065)
* Fix generate OpenAPI components part from case classes with arity > 22 * Add test case for generating components in OpenAPI gen with case classes with arity > 22 * PR feedback: move test to OpenAPIGenSpec
- Loading branch information
Showing
3 changed files
with
174 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
zio-http/jvm/src/test/scala/zio/http/endpoint/openapi/BigModel.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package zio.http.endpoint.openapi | ||
|
||
import zio.schema.{DeriveSchema, Schema} | ||
|
||
// case class with 22+ (23 in this case) fields | ||
final case class BigModel( | ||
f1: Boolean, | ||
f2: Boolean, | ||
f3: Boolean, | ||
f4: Boolean, | ||
f5: Boolean, | ||
f6: Boolean, | ||
f7: Boolean, | ||
f8: Boolean, | ||
f9: Boolean, | ||
f10: Boolean, | ||
f11: Boolean, | ||
f12: Boolean, | ||
f13: Boolean, | ||
f14: Boolean, | ||
f15: Boolean, | ||
f16: Boolean, | ||
f17: Boolean, | ||
f18: Boolean, | ||
f19: Boolean, | ||
f20: Boolean, | ||
f21: Boolean, | ||
f22: Boolean, | ||
f23: Boolean, | ||
) | ||
object BigModel { | ||
implicit val codec: Schema[BigModel] = DeriveSchema.gen[BigModel] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters