docs(dataset-schema): distinguish top-level fields from views.*.transformation.fields#2733
Draft
DaveHanns wants to merge 1 commit into
Draft
docs(dataset-schema): distinguish top-level fields from views.*.transformation.fields#2733DaveHanns wants to merge 1 commit into
fields from views.*.transformation.fields#2733DaveHanns wants to merge 1 commit into
Conversation
…ansformation.fields` The Dataset schema specification page defines two keys named `fields` — the top-level JSON Schema object and the flat array under `views.<viewId>.transformation.fields`. They live in different places and do different jobs, but the page does not contrast them explicitly, and readers regularly populate only the view-level array. When they do, Console still renders the selected columns, but validation and the MCP / API schema have nothing to work from. Add a short subsection under "Schema components" that names both locations, tables their type and purpose side by side, calls out the common mistake, and links to the fuller example lower on the page. Surfaced during an evaluation of Apify surfaces for agent-driven Actor development. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
✅ Preview for this PR (commit |
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.
Summary
The Dataset schema specification page defines two different keys named
fields, but does not contrast them explicitly:fields— a JSON Schema object keyed by field name (underproperties). Drives server-side validation, MCP schema discovery for AI agents, and the documented API contract.views.<viewId>.transformation.fields— a flat array of field name strings. Selects which columns appear in the Console Output tab and their order. Display-only.Because the two keys share a name and the page introduces them in separate sections, it is easy to populate only the view-level array. Console then still renders the selected columns, so the mistake looks harmless — but validation, the MCP schema, and the API metadata have no schema to work from.
What this PR changes
Adds a short
### The two \fields` keyssubsection under## Schema components`. The subsection:## Fieldsexample.No content is removed; the existing structure is unchanged.
Reproducer for the confusion
Following the page in order, a reader hits the
views.*.transformation.fieldsarray before reaching the top-levelfieldssection, and often writes only the view-level array. For example:{ "actorSpecification": 1, "views": { "overview": { "title": "Overview", "transformation": { "fields": ["title", "price"] }, "display": { "component": "table" } } } }This validates and renders in Console, but the Actor exposes no field-level schema for validation, the MCP server, or the API contract that downstream agents rely on. The intended shape has both keys populated (as in the page's own top-of-file example), and the new subsection makes that requirement explicit up front.
Test plan
fieldslocations is clear after one pass.## Schema componentsstill shows both keys populated (unchanged), and the new subsection references it.pnpm startrenders the new subsection with the table formatted correctly and the two intra-page links resolving.Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.