question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extending feature for schema validation

See original GitHub issue
  • Task 1 Improve the message raised by schema validation architecture when the handler class contains schema and the name of the handler class is also present in the list HANDLER_CLASS_NAMES_WHICH_STILL_NEED_SCHEMAS. Explanation: Currently the error raised when the above condition staisfies is something – “Nonetype object has no attibute …” After Modification: Proper error message should be raised which is self explanatory that handler class name(s) must be removed from the list.

  • Task 2 Allowing head request for Schema validation. Explanation: Currently Oppia supports GET/PUT/POST/DELETE request methods but sometimes in production HEAD request is also initiated. Thus allowing schema validation architecture to skip validtaion when it encounters request from HEAD method.

  • Task 3 Introduce lint checks to enforce developers to use self.normalized_payload and self.normalized_request instead of self.payload and self.request while writing new handlers / schema.

Reference to some useful links:

  1. How to write schema validation for handler arguments

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vojtechjelinekcommented, Apr 21, 2022

This was closed in #15044. Thanks @aasiffaizal

0reactions
vojtechjelinekcommented, Jan 20, 2022

Yeah, it is not yet deployed, but I marked that PR to be cherry-picked into the relase.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating or Extending Validator Classes - python-jsonschema
Callable) – A function that given a schema, returns the list of applicable validators (validation keywords and callables) which will be used to...
Read more >
Extending Cerberus
As schemas themselves are validated, you can provide constraints as literal Python expression in the docstring of the rule's implementing method to validate...
Read more >
Extending or Inherit schema #69 - dry-rb/dry-validation - GitHub
Is there a way to extend several schemas? Like this: Dry::Validation.Schema(OtherSchema1, OtherSchema2) do # your rules end.
Read more >
Structuring a complex schema — Understanding JSON ...
Let's extend the previous customer schema example to use a common schema for the name properties. It doesn't make sense to define a...
Read more >
json - meta-schema features in VS Code extension warning in ...
When defining a custom schema like the following, I get a warning stating that the validator doesn't support meta-schema features yet. Needless ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found