Add JSON schema generation for better config editing experience.
Adds command line openfmb-adapter -s [filename] to generate root config schema, and openfmb-adapter -s [filename] -p [plugin-name] for plugin-specific schema. Optionally, the --pretty-print flag can be used to pretty-print the schema (be aware that the resulting file size is ~10x larger)
All the default config generation is now done through the schema, not manually. The CLI is the exact same thing as previously. All the manual code and unnecessary YAML stuff was removed from the codebase.
Config breaking changes:
In MQTT, to subscribe/publish all profiles, it now uses * (like NATS) instead of #.
In goose-sub, profile is now profiles list with only one element. Also, goose-structure was moved next to the profile. Generate a default config to see what I mean.
In templating, instead of a custom string "key = value", the values are now split in two. So this:
openfmb-adapter -s [filename]
to generate root config schema, andopenfmb-adapter -s [filename] -p [plugin-name]
for plugin-specific schema. Optionally, the--pretty-print
flag can be used to pretty-print the schema (be aware that the resulting file size is ~10x larger)Config breaking changes:
*
(like NATS) instead of#
.goose-sub
,profile
is nowprofiles
list with only one element. Also,goose-structure
was moved next to the profile. Generate a default config to see what I mean.becomes this: