Skip to content

Add version to configuration file#116

Merged
kyleconroy merged 3 commits intomasterfrom
config-version
Oct 26, 2019
Merged

Add version to configuration file#116
kyleconroy merged 3 commits intomasterfrom
config-version

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

@kyleconroy kyleconroy commented Oct 26, 2019

Configuration files must now have a version set.

{
  "version": "1",
  "packages": [...]
}

Thanks to @inconshreveable for the suggestion. This will be an annoying update for the early adopters, but I think it's worth the pain for all future sqlc users.

Fixes #113

`sqlc generate` now errors in the following cases:
- The required version number is empty or not equal to "1"
- There are zero packages configured
- An unknown key exists in the configuration file
@kyleconroy kyleconroy merged commit ff349b0 into master Oct 26, 2019
@kyleconroy kyleconroy deleted the config-version branch October 29, 2019 00:15
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.

Disallow configuration file from having unknown properties

1 participant