8000 Bug: Jsonschema of DocList not correct · Issue #1521 · docarray/docarray · GitHub
[go: up one dir, main page]

Skip to content

Bug: Jsonschema of DocList not correct #1521

@JohannesMessner

Description

@JohannesMessner

DocList does not generate a correct JSONSchema; the schema of the documents in the doclist do not show up:

from docarray import BaseDoc, DocList
import pydantic


class Doc(BaseDoc):
    ...


print(pydantic.schema_of(DocList[Doc]))
print(pydantic.schema_of(List[Doc]))

class DocDoc(BaseDoc):
    docs: DocList[Doc]

print(print(DocDoc.schema()))

This is the cause of OpenAPI through FastAPI not working properly, as seen in #1449

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0