Skip to content

Conversation

nivekithan
Copy link

@nivekithan nivekithan commented Sep 12, 2025

This pr adds $schema as expected property to config so that parsing the following json file will not cause any error

{ "$schema": "https://www.schemastore.org/sqlc-2.0.json", "version": "2", "sql": [ { "engine": "sqlite", "queries": "./problems/means-to-end/sql/queries.sql", "schema": "./problems/means-to-end/sql/schema.sql", "gen": { "go": { "package": "db", "out": "./problems/means-to-end/db" } } } ] }

Result

Change when running the generate command for the above config file

Before

sqlc generate error parsing sqlc.json: yaml: unmarshal errors: line 2: field $schema not found in type config.Config

After

sqlc-dev generate # exited without any error
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Sep 12, 2025
@nivekithan nivekithan changed the title Add as expected property to config Add $schema as expected property to config Sep 12, 2025
@dosubot dosubot bot added the 🔧 golang label Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. 🔧 golang

1 participant