You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The description and example properties are used in the documentation. Description is a string, and example an instance of the entity.
# eve-demo# Add "description" to one of the entities
Actual Behavior
Error in POST:
Traceback (most recent call last):
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/flask/app.py", line 2292, in wsgi_app
response =self.full_dispatch_request()
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv =self.handle_user_exception(e)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraiseraise value
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv =self.dispatch_request()
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_requestreturnself.view_functions[rule.endpoint](**req.view_args)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/eve/endpoints.py", line 58, in collections_endpoint
response = post(resource)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/eve/methods/common.py", line 318, in rate_limitedreturn f(*args, **kwargs)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/eve/auth.py", line 80, in decoratedreturn f(*args, **kwargs)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/eve/methods/common.py", line 1351, in decorated
r = f(resource, **combined_args)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/eve/methods/post.py", line 49, in postreturn post_internal(resource, payl, skip_validation=False)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/eve/methods/post.py", line 167, in post_internal
schema, resource=resource, allow_unknown=resource_def["allow_unknown"]
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/eve/validation.py", line 28, in __init__super(Validator, self).__init__(*args, **kwargs)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/cerberus/validator.py", line 169, in __init__self.schema = kwargs.get('schema', None)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/cerberus/validator.py", line 509, in schemaself._schema = DefinitionSchema(self, schema)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/cerberus/schema.py", line 69, in __init__self.validate(schema)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/cerberus/schema.py", line 197, in validateself._validate(schema)
File "/home/rmlopes/dev/knowLOGIS/knowlogisAPI/__py_venv__/lib/python3.5/site-packages/cerberus/schema.py", line 219, in _validateraise SchemaError(self.schema_validator.errors)
cerberus.schema.SchemaError: {'firstname': [{'description': ['unknown rule']}]}
Environment
Python version: 3.5
Eve version: 0.9
Cerberus:1.2
This is reported at the swagger extension but I believe is a core problem. The examples are simpler at eve-demo hence it is uncaught.
The text was updated successfully, but these errors were encountered:
Actually, this is due to Cerberus 1.0+ dropping support for transparent_schema_rules. When we did that, we did not upgrade Eve and Eve-Swagger docs accordingly. Right now, in order to add support for description and example eve-swagger options, you have to supply a custom validator, as suggested in eve-swagger README (which needs to be amended to get rid of the now non-existent transparent_schema_rules option)
Expected Behavior
The description and example properties are used in the documentation. Description is a string, and example an instance of the entity.
Actual Behavior
Error in POST:
Environment
This is reported at the swagger extension but I believe is a core problem. The examples are simpler at
eve-demo
hence it is uncaught.The text was updated successfully, but these errors were encountered: