28#include "../../Source/third_party/nlohmann/json.hpp"
93 const std::string&
uuid,
94 const std::string& blueprintType);
113 static bool HasCycle(
const std::string& start,
115 std::vector<std::string>&
visited,
116 std::vector<std::string>&
inStack);
ComponentTypeID GetComponentTypeID_Static()
Converts legacy blueprint JSON to the Phase 8 subgraph flat-dict format.
static bool HasCycle(const std::string &start, const nlohmann::json &subgraphs, std::vector< std::string > &visited, std::vector< std::string > &inStack)
void MigrateDataSection(nlohmann::json &blueprint) const
~SubgraphMigrator()=default
bool NeedsMigration(const nlohmann::json &blueprint) const
Returns true when the blueprint uses the legacy format (data.nodes exists at the top level of the dat...
SubgraphMigrator()=default
static nlohmann::json MakeEmptySubgraph(const std::string &name, const std::string &uuid, const std::string &blueprintType)
Creates an empty subgraph definition JSON object.
bool IsNewFormat(const nlohmann::json &blueprint) const
Returns true when the blueprint is already in the Phase 8 format (data.rootGraph exists).
static bool ValidateSubgraphReferences(const nlohmann::json &blueprint, std::string &outError)
Validates that every subgraphUUID referenced by SubGraph nodes actually exists in data....
nlohmann::json Migrate(const nlohmann::json &blueprint) const
Migrates a legacy blueprint to the flat-dictionary format.
static std::vector< std::string > CollectSubgraphRefs(const nlohmann::json &graphObj)
< Provides AssetID and INVALID_ASSET_ID