wotpy.wot.validation
Schema following the JSON Schema specification used to validate the shape of Thing Description documents.
Module Attributes
Modifications have been made to the schema declared in the $id field to make forms optional by removing the relevant required and minItems fields for the forms keyword. |
Functions
|
Returns True if the given value is a safe machine-readable name. |
|
Returns True if the given value is a valid URI. |
Exceptions
Exception raised when a document for an object in the TD hierarchy has an invalid format. |
- exception wotpy.wot.validation.InvalidDescription
Bases:
ExceptionException raised when a document for an object in the TD hierarchy has an invalid format.
- wotpy.wot.validation.REGEX_ANY_URI = '^((\\w+:(\\/?\\/?)[^\\s]+)|((..\\/)+)[^\\s]*)$'
Modifications have been made to the schema declared in the $id field to make forms optional by removing the relevant required and minItems fields for the forms keyword.
- wotpy.wot.validation.is_valid_safe_name(val)
Returns True if the given value is a safe machine-readable name.
- wotpy.wot.validation.is_valid_uri(val)
Returns True if the given value is a valid URI.