-
Notifications
You must be signed in to change notification settings - Fork 100
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
Change format of content of _validation field #425
Comments
rochamatcomp
added a commit
to rochamatcomp/spidermon
that referenced
this issue
Feb 8, 2024
The content of _validation field must to be the string representation of a Python dict instead defaultdict when SPIDERMON_VALIDATION_ADD_ERRORS_TO_ITEMS setting is True.
rochamatcomp
added a commit
to rochamatcomp/spidermon
that referenced
this issue
Feb 8, 2024
The content of _validation field must to be the string representation of a Python dict instead defaultdict when SPIDERMON_VALIDATION_ADD_ERRORS_TO_ITEMS setting is True.
Can I take this issue? I have created this pull request #431. |
rochamatcomp
added a commit
to rochamatcomp/spidermon
that referenced
this issue
Feb 16, 2024
The content of _validation field must to be the string representation of a Python dict instead defaultdict when SPIDERMON_VALIDATION_ADD_ERRORS_TO_ITEMS setting is True.
VMRuiz
pushed a commit
that referenced
this issue
Mar 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a validation error is found and SPIDERMON_VALIDATION_ADD_ERRORS_TO_ITEMS setting is
True
, we populate the_validation
field with the errors.The content of this field is the string representation of a Python defaultdict such as:
'_validation': defaultdict(<class 'list'>, {'author_url': ['Invalid URL']})
To make this field valid as JSON, we should have it as a list of objects such as:
'_validation': [ {'author_url': ['Invalid URL'] }]
This change will improve the data returned, making it possible to be read as a JSON.
The text was updated successfully, but these errors were encountered: