case class File(
id: String,
`object`: String,
bytes: Long,
created_at: Long,
filename: String,
purpose: String
) derives Schema
case class FileList(
data: List[File],
`object`: String
) derives Schema
gives;
io.github.quafadas.dairect.filesApi#FileList: Found invalid shape recursion: io.github.quafadas.dairect.filesApi#FileList$data > io.github.quafadas.dairect.filesApi#FileList. A structure cannot be mutually recursive through all required members.
My naive reading of the deriving codebase suggests this is to do with a collision when autogenerating smithy collection shape names. With this information, a simple workaround (note the y appended) is;
case class FileListy(
data: List[File],
`object`: String
) derives Schema
Recorded for posterity.
gives;
My naive reading of the deriving codebase suggests this is to do with a collision when autogenerating smithy collection shape names. With this information, a simple workaround (note the
yappended) is;Recorded for posterity.