Skip to content

simplify settings JSON Schema code, fix validation errors

Warren Gifford requested to merge json-schema-validation-settings into master

Created by: sqs

  • fix #1778 (closed)
  • simplify settings JSON Schema code
  • remove most useless/temporary JSON Schema IDs
  • add tests and comments for JSON Schema merging

Test plan:

  • With at least 1 extension enabled (that contributes configuration, such as sourcegraph/go or sourcegraph/typescript), visit all settings pages: global, org, user. Completion should work for extension-defined settings properties AND base settings properties. There should be no validation errors for an empty ({}) settings document.

Justification for not adding full test coverage: This involves the Monaco editor, which is a particularly hard-to-test component because it requires a full headless browser and a complex interaction-based test suite. Overall, this diff removes (non-test, non-comment) code, simplifies code, and fixes a bug, so IMO it is a big net win even though it doesn't add this new kind of e2e test to test it.

Merge request reports

Loading