Skip to content

chore(data-mcp): read the Graph and Search JSON Schema at /json-schema - #200

Merged
jm-rivera merged 1 commit into
devfrom
chore/json-schema-routes
Nov 14, 2026
Merged

jm-rivera merged 1 commit into
devfrom
chore/json-schema-routes

Conversation

@jm-rivera

@jm-rivera jm-rivera commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

dfo-apis serves the JSON Schema documents at /api/graph/json-schema and /api/search/json-schema, and its /schema paths answer 404 once that move deploys. The graph-schema recipe, the capabilities fixture and the live contract tests read the new paths. No runtime code reads either document.

Changes

  • justfile: graph-schema reads /api/graph/json-schema.
  • services/data-mcp/tests/test_contract_integration.py: the three live reads use the new paths.
  • services/data-mcp/tests/fixtures/graph_api_capabilities.json: the door is named json_schema. No other line changes.
  • services/data-mcp/tests/test_graph_wire.py: docstring.

Notes for reviewers

  • Merge after refactor(api): serve the JSON Schema documents at /json-schema apis#307 deploys. Until then the live contract tests and just graph-schema get 404 from a deployed build.
  • graph_api_schema.json and graph_api_capabilities.json need a refresh after the dfo-apis deploy, with just graph-schema and then just graph-models. The schema snapshot predates the wire models dfo-apis serves today, so test_live_graph_schema_matches_the_committed_snapshot fails on body drift against any current build. When feat(graph): serve the graph's schema, its use by each dataset and a StatVar definition check apis#301 deploys, the served document also gains the schema_* entries of the Graph schema routes.
  • The capabilities fixture's capability_version, graph_b042a2941aff8fd3, matches no current dfo-apis tree. The graph token changes with the move and again with the schema routes, and the refresh above records the deployed one.

Testing: pytest on test_graph_wire.py, test_tool_text_capabilities.py and test_contract_integration.py: 9 passed, 9 skipped (the live tests skip without DFO_APIS_URL). With DFO_APIS_URL at a local dfo-apis that serves the new paths, both /api/search/json-schema tests pass, the graph snapshot test fails on the drift above, and the country/KEN node test got a 502 from the dev graph. ruff format, ruff check and pre-commit are clean on the four files. ty check reports one diagnostic in test_graph_wire.py that dev also has.

The graph-schema recipe, the capabilities fixture and the live
contract tests follow the dfo-apis routes, which serve the JSON
Schema documents at /api/graph/json-schema and
/api/search/json-schema.
@jm-rivera
jm-rivera marked this pull request as ready for review November 14, 2026 21:17
@jm-rivera
jm-rivera merged commit 4d0bb4e into dev Nov 14, 2026
13 checks passed
@jm-rivera
jm-rivera deleted the chore/json-schema-routes branch November 14, 2026 21:54
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