Make JSON a self-contained analysis interchange for downstream exporters.
Persist machine types, finalize on JSON import, resolve @Value placeholders, and canonicalize String states so HTML and other consumers can import JSON without source re-analysis. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,7 +32,7 @@ public class HtmlExporterCommand implements Callable<Integer> {
|
||||
@CommandLine.Spec
|
||||
CommandLine.Model.CommandSpec spec;
|
||||
|
||||
@Option(names = {"-i", "--input"}, description = "Input directory containing the Spring Boot project source code.")
|
||||
@Option(names = {"-i", "--input"}, description = "Input directory containing the Spring Boot project source code. Optional with -j when JSON already contains machine types and canonical identifiers.")
|
||||
private Path inputDir;
|
||||
|
||||
@Option(names = {"-j", "--json"}, description = "Input JSON file containing the state machine definition.")
|
||||
@@ -97,7 +97,7 @@ public class HtmlExporterCommand implements Callable<Integer> {
|
||||
}
|
||||
|
||||
if (jsonFile != null) {
|
||||
exportService.runJsonExporter(jsonFile, outputDir, formats, profiles);
|
||||
exportService.runJsonExporter(jsonFile, outputDir, formats, profiles, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, inputDir);
|
||||
} else {
|
||||
boolean renderChoicesAsDiamonds = !noDiamonds;
|
||||
exportService.runExporter(inputDir, outputDir, formats, renderChoicesAsDiamonds, profiles, flowsFile, machineFilter, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, includeGeneratedSources);
|
||||
|
||||
Reference in New Issue
Block a user