Closed imiljkovic closed 11 months ago
Hey @imiljkovic 👋
JSON is just one of the options for formatting the inspected schema, just like the{{ mermaid . }}
option. There are no plans to support reading JSON schemas natively in Atlas as some basic features cannot be implemented with JSON.
However, you can write an external schema loader (data source) for it if you're interested. See this doc as an example: https://atlasgo.io/atlas-schema/external
Feel free to join our Discord server and message me if you need help with it.
Hi @a8m ! Can you give more details on which basic features of Atlas DDL that can't be expressed in JSON?
In my opinion, being able to have JSON schema input has these benefits:
For context, Terraform supports *.tf.json
as input. This is used for the 2nd use case I list above, for example, in their terraform-cdk project.
After generating JSON schema with the following command:
I tried applying it to the different database:
resulting with:
Error: unknown schema file: "schema.json"
HCL schema works as expected.
I use the latest version (0.15.0) with SQL Server beta driver.
Is this a bug, or working with JSON is a one-way street? If so, are there any plans for adding full JSON support?