You are talking about the generateChangeLog or diffChangeLog command, right?
It should chose the correct type based on the file extension, so you can use .json or .yaml. There isn’t support to generate an sql-based changelog at this point.
When I try to create .json and .yaml files it generates the files but they are empty. I’m using the same command that generates an .xml file just changing the extension.
Yes, if you use the formatted sql style, liquibase will just execute the sql listed.
The trouble with generating actual SQL as the output is that it is going to vary depending on the target database. Normally to add support for a new output format you need to add a new ChangeLogSerializer implementation and then override the needed methods. They are just passed the Changes needed to “fix” the database but no Database reference. You should be able, though, as part of the serialize method call the SqlGeneratorFactory with the passed Change and a mock Database instance to get the actual SQL and return that from the serialize method.
I would guess it would maybe take a day or so to get figured out.
Shoot. Apparently the json/yaml specific methods to actually write the changesets did not make it into 3.0. I created https://liquibase.jira.com/browse/CORE-1404 to track the fix.