validateSchema
Check a schema document without storing it — with line, column and span for each error.
validateSchema(input: SchemaValidateInput): Promise<SchemaValidateResult>validateSchema(request: SchemaValidateRequest): Promise<SchemaValidateResponse>Parameters
ParameterTypeRequired
schemaDocumentstringrequiredThe document to check.
Returns
FieldTypePresence
namespacestringalwaysThe namespace it would land in.
wouldBeVersionintegeralwaysThe version it would take if uploaded.
validationErrorsSchemaError[]alwaysEmpty means valid. Each error carries code, message, line, column, length and severity — enough to underline the offending span in an editor.
Validation failures are not exceptions
This verb resolves with a populated validationErrors array rather than
throwing. Code that only wraps the call in a try/catch treats an invalid
schema as a successful one. Check the array.
See also
Was this page helpful?