Skip to content
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

Wrong types in JSON #125

Open
KathRains opened this issue Nov 4, 2020 · 0 comments
Open

Wrong types in JSON #125

KathRains opened this issue Nov 4, 2020 · 0 comments

Comments

@KathRains
Copy link

KathRains commented Nov 4, 2020

I specified the model as:

class TestRoleSchema(db_schema.SQLAlchemyAutoSchema):
    class Meta:
        model = Role

If I have the datetime field, the result JSON will be:

created:
format: "date-time"
title: "created"
type: "string"

The question is why the type is string when the original type is Date? Are there any specifications on data types?

Also, for boolean the type is presented as an array:

is_test_data:
{  title: "is_test_data"
   type: Array(2)
   0: "boolean"
   1: "null"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant