|
Sen API
Sen Libraries
|
Renders JSON-Schema descriptions of sen type sets. Stateful (caches the loaded inja templates), so prefer reusing one instance across calls when possible. More...
#include <json.h>
Public Member Functions | |
| JsonGenerator () | |
| ~JsonGenerator () | |
| std::string | generatePackage (const sen::lang::TypeSetContext &typeSets, const PackageOptions &opts={}) |
| Renders a package schema for the supplied type set. | |
| std::string | generateComponent (const sen::lang::TypeSetContext &typeSets, const ComponentOptions &opts={}) |
| Renders a component schema (i.e. one that exposes a Configuration class) for the supplied type set. | |
| std::string | combineSchemas (const std::vector< std::string > &schemaContents, const std::string &schemaName) |
| Renders a kernel configuration file that combines an arbitrary number of previously rendered schemas into one document. schemaContents are the raw rendered strings (as produced by generatePackage / generateComponent or read from disk). | |
| std::string | renderTypeSchema (const sen::CustomType &type) |
| Renders one type's JSON-Schema fragment in the same shape the file-level renderers use ("<qualifiedName>": { "$id": "...", ... }). Cross-type references are emitted as $ref strings keyed by qualified name; the caller resolves them. | |
Renders JSON-Schema descriptions of sen type sets. Stateful (caches the loaded inja templates), so prefer reusing one instance across calls when possible.
| sen::gen::JsonGenerator::JsonGenerator | ( | ) |
| sen::gen::JsonGenerator::~JsonGenerator | ( | ) |
|
nodiscard |
Renders a package schema for the supplied type set.
|
nodiscard |
Renders a component schema (i.e. one that exposes a Configuration class) for the supplied type set.
|
nodiscard |
Renders a kernel configuration file that combines an arbitrary number of previously rendered schemas into one document. schemaContents are the raw rendered strings (as produced by generatePackage / generateComponent or read from disk).
|
nodiscard |
Renders one type's JSON-Schema fragment in the same shape the file-level renderers use ("<qualifiedName>": { "$id": "...", ... }). Cross-type references are emitted as $ref strings keyed by qualified name; the caller resolves them.