The nova.api.validation.validators Module

Internal implementation of request Body validating middleware.

class FormatChecker(formats=None)

Bases: jsonschema._format.FormatChecker

A FormatChecker can output the message from cause exception

We need understandable validation errors messages for users. When a custom checker has an exception, the FormatChecker will output a readable message provided by the checker.

check(instance, format)

Check whether the instance conforms to the given format.

  • instance – the instance to check
  • format (str) – the format that instance should conform to

any primitive type (str, number, bool)


FormatError if instance does not conform to format

Previous topic

The nova.api.validation.parameter_types Module

Next topic

The nova.api.validator Module

Project Source

This Page