We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
jsonschema validator is not working .
jsonschema
user_schema = { "type":"object", "properties": { "name":{ "type": "string" }, "address":{ "type" : "string" } } } from falcon.media.validators import jsonschema class Users @jsonschema.validate(user_schema) def on_post(self, req, resp): print("called")
The above code seems to work fine when address param is missing in the request body. request is sent using POST, content-type is application/json
address
POST
application/json
The text was updated successfully, but these errors were encountered:
for anyone looking in to this issue its becuase my schema was not setup properly. i had to change it to:
user_schema = { "type":"object", "properties": { "name":{ "type": "string" }, "address":{ "type" : "string" } }, "required":["name","address"] }
to get it working
Sorry, something went wrong.
@anekix cool that you sorted it out!
I am closing this issue then, but I will check if we need a follow-up documentation issue: I understand the current See json-schema.org for more information on defining a compatible dictionary is not necessarily the most helpful for the user.
We have also created a new umbrella issue for better documentation: #1393
No branches or pull requests
jsonschema
validator is not working .The above code seems to work fine when
address
param is missing in the request body.request is sent using
POST
, content-type isapplication/json
The text was updated successfully, but these errors were encountered: