Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add $schema as expected property to config #4102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nivekithan wants to merge 1 commit into sqlc-dev:main
base: main
Choose a base branch
Loading
from nivekithan:nive/add_

Conversation

Copy link

@nivekithan nivekithan commented Sep 12, 2025
edited
Loading

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

sz3lbi reacted with thumbs up emoji
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
size:XS This PR changes 0-9 lines, ignoring generated files. 🔧 golang
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /