Skip to content

Fix: Add schemas property to dataconnect.yaml JSON schema#10774

Open
fredzqm wants to merge 2 commits into
mainfrom
fix-dataconnect-schemas-4144845718607347064
Open

Fix: Add schemas property to dataconnect.yaml JSON schema#10774
fredzqm wants to merge 2 commits into
mainfrom
fix-dataconnect-schemas-4144845718607347064

Conversation

@fredzqm

@fredzqm fredzqm commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This patch updates schema/dataconnect-yaml.json to include the schemas property as an array of schema items. This resolves validation issues in VS Code for dataconnect apps that specify an array of schema configurations using schemas.


PR created automatically by Jules for task 4144845718607347064 started by @fredzqm

Co-authored-by: fredzqm <9068391+fredzqm@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the dataconnect-yaml.json schema to support a list of schema configurations via a new schemas array property. The reviewer identified an issue where the referenced #/definitions/schema does not define an id property and has additionalProperties set to false, which will cause validation failures for secondary schemas that require an id. A suggestion was provided to update the schema definition to include the id property.

Comment on lines +84 to 90
"schemas": {
"type": "array",
"items": {
"$ref": "#/definitions/schema"
},
"description": "A list of schema configurations."
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While adding the schemas property is correct, the referenced #/definitions/schema definition does not define the id property (which is used by secondary schemas in the schemas array, as represented by SchemaYaml in src/dataconnect/types.ts).

Because #/definitions/schema has "additionalProperties": false, any schema configuration in the schemas array that specifies an id will fail JSON schema validation in VS Code.

To fix this, please also update #/definitions/schema (around line 47) to include the id property:

    "schema": {
      "additionalProperties": false,
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the schema configuration."
        },
        "source": {
          "type": "string",
          "description": "Relative path to directory containing GQL files defining the schema. If omitted, defaults to ./schema."
        },
        "datasource": {
          "$ref": "#/definitions/dataSource"
        }
      }
    }

@fredzqm
fredzqm enabled auto-merge (squash) July 7, 2026 23:26
@fredzqm
fredzqm disabled auto-merge July 7, 2026 23:26
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.

2 participants