Expand description
Input text (docs/spec/input-text.md).
Every string and object member name of a specification, a composition file
and caller data is a sequence of Unicode scalar values. A Rust String is
always one, so the value entry points need no check. JSON text can still
carry an unpaired surrogate escape such as "\ud800", which serde_json
refuses to decode. JsonText reads such a document without replacing
anything, and check_specification and check_inputs report the same
failures as every other runtime: the load failure INVALID_TEXT for a
specification or a file, and INVALID_FORM_INPUT for other caller values.
Structs§
- Json
Text Error - JSON text that is not one JSON document.
Enums§
- Json
String - A string or member name of a JSON document: valid text, or the UTF-16 code units of text that holds an unpaired surrogate.
- Json
Text - A JSON document read without replacing any text.
Constants§
- MESSAGE
- Message of every input text failure.
- VALUE_
LIMIT_ MESSAGE - Message of every value beyond the limits.
Functions§
- check_
inputs - Check named caller values in order; absent values are skipped. Invalid text
is
INVALID_FORM_INPUTnaming the value and its path, and a value beyond its limits isINVALID_FORM_INPUTnaming the value. Each value’s first failure decides its error. - check_
specification - Check a specification and then the composition files an operation reads.
Invalid text is the
INVALID_TEXTload failure located at its specification path, or at the file name followed by its path in the file; an invalid file name is located at the empty path. A value beyond its limits isINVALID_FORM_INPUTnamingspecorfiles. Each value is checked in walk order: the first failure of the value decides its error. - validate_
detail_ text validate_detailover JSON text, with the checks ofvalidate_textfor the specification, the files and the base path.- validate_
list_ text validate_listover JSON text, with the checks ofvalidate_textfor the specification, the files and the base path.- validate_
text validateover JSON text. The specification, the files, the data and the base path are checked for invalid text in that order; each argument is then decoded and validated. Absent data validates an empty object.