-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VertexModel incompatibility with FastAPI's endpoint function definitions #17
Comments
Hi Erik, thanks for your appreciation, I'm creating another library FuriousAPI which is an extension for FastAPI
Regards, @nadobando |
Hi @nadobando , I am currently a little busy right now, so I won't have time for the next few weeks I'm afraid. Sorry for the unclear description of the issue. Usually in FastAPI you can declare the class as-is in the signature and its model will be displayed in the Swagger docs. The Process class above has been declared as a subclass according to your documentation. class Process(VertexModel):
name: str | None = None
process_type: str | None = None
status: Literal["Waiting", "Running", "Done", "Failed"] | None = None
uses: Annotated[list[NodeAttribute], Relation[Uses]] = "test"
class Collection(VertexCollectionConfig):
name = "process"
indexes = [
PersistentIndex(fields=["name"], unique=True),
] However I tried to make it work, it just didn't. Cheers! |
@eHorn96 I will try to look at this, I want to start working on the upgrade of pydantic, which will also add circular graphs feature |
Hi there,
Thanks for the library, first and foremost. It makes developing the business logic with ArangoDB easy af.
An issue I encountered is the incompatibility with FastAPI's endpoint function definitions.
Serializing to json just makes it look super ugly in swagger.
I forked your repo to help you on this tho. Surely there's a way to fix this.
Cheers!
Erik
The text was updated successfully, but these errors were encountered: