Closed kochalex closed 1 year ago
Separately, are there any plans for DBT to publish these schemas in a registry like https://schemas.getdbt.com/ or have them officially part of DBT?
Not yet, but over time as they get more robust it's not out of the question! We're also thinking about listing on schemastore, but that has some tradeoffs (see #3)
Ok, I've made the changes (caps and adding in $schema
), would you like me to cleanup & squash the history on this?
@kochalex we squash and merge so it's all good! Thank you for doing this 🌟
When trying to use these schemas in a CI workflow with our DBT project, I ran into a few errors with the JSON schema documents with both Ajv and jsonschema.
This has a couple of fixes that allowed the schemas themselves to be validated as draft 7. (I used draft 7 since it's the most common from my experience, but it might also be good to add a
$schema
entry to the files). There's also a sample GitHub Actions CI workflow that tests using ajv-cli:dbt_project.yml
andmodel.yml
files generated withdbt init
.Here's a run on my fork: https://github.com/kochalex/dbt-jsonschema/actions/runs/3048375813
Separately, are there any plans for DBT to publish these schemas in a registry like https://schemas.getdbt.com/ or have them officially part of DBT?
I've pointed my VS Code at these updated files and our project's YAML files validate ok, but it should be noted that the existing files also seemed to work ok with the VS Code YAML extension, it was just the CI cases that failed (with two separate validators). I know CI is not the intended use case here. 😸