diff --git a/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js b/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js index 1178795367899..ac92f31b890ed 100644 --- a/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js +++ b/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js @@ -35,7 +35,7 @@ describe(`VegaParser.parseAsync`, () => { await vp.parseAsync(); expect( - vp.error.startsWith('The input spec does not specify a "$schema":URL property') + vp.error.startsWith('Your specification requires a "$schema" field with a valid URL') ).toBeTruthy(); }); }); diff --git a/src/plugins/vis_type_vega/public/data_model/vega_parser.ts b/src/plugins/vis_type_vega/public/data_model/vega_parser.ts index 611bd483ad792..3e6cc038c7b68 100644 --- a/src/plugins/vis_type_vega/public/data_model/vega_parser.ts +++ b/src/plugins/vis_type_vega/public/data_model/vega_parser.ts @@ -121,13 +121,16 @@ export class VegaParser { if (!spec.$schema) { throw new Error( i18n.translate('visTypeVega.vegaParser.inputSpecDoesNotSpecifySchemaErrorMessage', { - defaultMessage: `The input spec does not specify a {schemaParam}:URL property. -The URL for the Vega schema: - {schemaUrl}/[library]/[version].json - [library] can be vega or vega-lite - [version] defines the version of the library for which you get the schema. -This link does not need to be accessible, and will only be used for describing Vega code.`, - values: { schemaParam: '"$schema"', schemaUrl: 'https://vega.github.io/schema' }, + defaultMessage: `Your specification requires a {schemaParam} field with a valid URL for +[Vega]({vegaSchemaUrl}) or +[Vega-Lite]({vegaLiteSchemaUrl}). +The URL is an identifier only. Kibana and your browser will never access this URL.`, + values: { + schemaParam: '"$schema"', + vegaLiteSchemaUrl: 'https://vega.github.io/vega-lite/docs/spec.html#top-level', + vegaSchemaUrl: + 'https://vega.github.io/vega/docs/specification/#top-level-specification-properties', + }, }) ); }