Skip to content

Remove remaining JSON schema usage from schema definition specs#1250

Closed
jwils wants to merge 1 commit into
joshuaw/lazy-json-ingestion-spec-defaultfrom
joshuaw/json-schema-spec-cleanup
Closed

Remove remaining JSON schema usage from schema definition specs#1250
jwils wants to merge 1 commit into
joshuaw/lazy-json-ingestion-spec-defaultfrom
joshuaw/json-schema-spec-cleanup

Conversation

@jwils

@jwils jwils commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Why

On #1224, @myronmarston noted that mentions of "JSON schema" in elasticgraph-schema_definition/spec should approach zero as part of the extraction, but his grep showed many remained.

What

  • The graphql_schema, datastore_config, and runtime_metadata spec supports now define schemas with no extension modules, and the json_schema calls that existed only to satisfy the JSON ingestion extension's scalar validation are removed.
  • The scalar "requires json_schema" test (duplicated by the json_ingestion suite) is deleted, and the long/unsigned_long placeholder-inference tests that depend on JSON schema bounds moved to scalar_type_extension_spec in elasticgraph-json_ingestion (along with a built-in-scalar placeholder map test, since JsonSafeLong's placeholder differs with the extension loaded).
  • The reserved-type-name test now exercises the core reserved_type_names mechanism directly; the ElasticGraphEventEnvelope reservation is already covered by the json_ingestion suite.
  • rake_tasks_spec runs its synthetic schemas without the extension and no longer asserts on JSON schema artifacts (covered by json_ingestion's schema_artifact_manager_extension_spec). A new short-diff test keeps SchemaArtifactManager#truncate_diff fully covered.
  • The "different JSON schema between interface and object fields" implements test moved to json_ingestion's json_schema_spec.

What intentionally remains: the rake-task tests that evaluate the repo's own config/schema.rb keep the extension (that schema is a JSON ingestion application), the define_schema test-support seam tests (the seam exists for optional ingestion extensions), and documentation text about JSON-the-format (JsonSafeLong etc.).

Verification

  • script/run_gem_specs elasticgraph-schema_definition and script/run_gem_specs elasticgraph-json_ingestion (both 100% line + branch coverage)
  • script/type_check
  • script/quick_build

Stack

Current PR is marked with ->.

As noted on #1224, mentions of JSON schema in
`elasticgraph-schema_definition/spec` should approach zero now that the JSON
schema logic lives in `elasticgraph-json_ingestion`:

- The graphql_schema, datastore_config, and runtime_metadata spec supports
  now run schemas without any extension modules, and the `json_schema` calls
  that existed only to satisfy the extension's scalar validation are gone.
- The scalar `json_schema` requirement test (duplicated by the json_ingestion
  suite) is deleted, and the `long`/`unsigned_long` placeholder-inference
  tests that depend on JSON schema bounds moved to the json_ingestion suite
  (along with the built-in-scalar placeholder map, which differs with the
  extension loaded).
- The reserved-type-name test now exercises the core `reserved_type_names`
  mechanism directly; the `ElasticGraphEventEnvelope` reservation is already
  covered by the json_ingestion suite.
- `rake_tasks_spec` runs its synthetic schemas without the extension and no
  longer asserts on JSON schema artifacts (covered by json_ingestion's
  integration spec). A new short-diff test keeps `truncate_diff` fully
  covered. The tests that evaluate the repo's own `config/schema.rb` still
  load the extension, since that schema is a JSON ingestion application.

The remaining mentions are the `define_schema` test-support seam (which
exists for optional ingestion extensions) and JSON-the-format documentation
text.
@jwils jwils closed this Jun 11, 2026
@jwils jwils deleted the joshuaw/json-schema-spec-cleanup branch June 11, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant