Repository navigation
chore(data-mcp): read the Graph and Search JSON Schema at /json-schema - #200
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dfo-apis serves the JSON Schema documents at
/api/graph/json-schemaand/api/search/json-schema, and its/schemapaths answer 404 once that move deploys. Thegraph-schemarecipe, the capabilities fixture and the live contract tests read the new paths. No runtime code reads either document.Changes
justfile:graph-schemareads/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 namedjson_schema. No other line changes.services/data-mcp/tests/test_graph_wire.py: docstring.Notes for reviewers
just graph-schemaget 404 from a deployed build.graph_api_schema.jsonandgraph_api_capabilities.jsonneed a refresh after the dfo-apis deploy, withjust graph-schemaand thenjust graph-models. The schema snapshot predates the wire models dfo-apis serves today, sotest_live_graph_schema_matches_the_committed_snapshotfails 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 theschema_*entries of the Graph schema routes.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:
pytestontest_graph_wire.py,test_tool_text_capabilities.pyandtest_contract_integration.py: 9 passed, 9 skipped (the live tests skip withoutDFO_APIS_URL). WithDFO_APIS_URLat a local dfo-apis that serves the new paths, both/api/search/json-schematests pass, the graph snapshot test fails on the drift above, and thecountry/KENnode test got a 502 from the dev graph.ruff format,ruff checkandpre-commitare clean on the four files.ty checkreports one diagnostic intest_graph_wire.pythat dev also has.