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

The Boefje.schema field shadows out BaseModel.schema #3507

Closed
ammar92 opened this issue Sep 10, 2024 · 0 comments · Fixed by #3557
Closed

The Boefje.schema field shadows out BaseModel.schema #3507

ammar92 opened this issue Sep 10, 2024 · 0 comments · Fixed by #3557
Assignees
Labels
boefjes Issues related to boefjes bug Something isn't working

Comments

@ammar92
Copy link
Contributor

ammar92 commented Sep 10, 2024

Describe the bug
Currently the Boefje.schema field shadows out BaseModel.schema. This can cause trouble, because BaseModel.schema is a dict of the schema (and BaseModel.schema_json is the JSON string representation of that dict)

To Reproduce
Run the Boefje module and monitor the logs; you should see a warning triggered by Pydantic due to the naming conflict

Expected behavior
No warnings should be triggered, and the schema should work as expected (which it probably already did).

Additional context

  • We should look for an alternative name
    • Perhaps we can use another field name, but use 'schema' as an aliased name (even if it's just for backward compatibility)
  • We need to make sure/ investigate it doesn't have compatibility issues when we change it
@ammar92 ammar92 added bug Something isn't working boefjes Issues related to boefjes labels Sep 10, 2024
@ammar92 ammar92 mentioned this issue Sep 18, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
boefjes Issues related to boefjes bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants