diff --git a/include/openspace/documentation/documentationengine.h b/include/openspace/documentation/documentationengine.h index e690a4413a..392d36cf10 100644 --- a/include/openspace/documentation/documentationengine.h +++ b/include/openspace/documentation/documentationengine.h @@ -92,8 +92,8 @@ public: nlohmann::json generateFactoryManagerJson() const; nlohmann::json generateKeybindingsJson() const; nlohmann::json generatePropertyOwnerJson(properties::PropertyOwner* owner) const; - nlohmann::json generateLicensesGroupedByLicense() const; - nlohmann::json generateLicenseList() const; + nlohmann::json generateLicenseGroupsJson() const; + nlohmann::json generateLicenseListJson() const; nlohmann::json generateActionJson() const; nlohmann::json generateEventJson() const; diff --git a/modules/server/src/topics/documentationtopic.cpp b/modules/server/src/topics/documentationtopic.cpp index 344a35cce2..eb2467902e 100644 --- a/modules/server/src/topics/documentationtopic.cpp +++ b/modules/server/src/topics/documentationtopic.cpp @@ -58,7 +58,7 @@ void DocumentationTopic::handleJson(const nlohmann::json& json) { // TODO: Add asset documentation here } else if (requestedType == "meta") { - response = DocEng.generateLicenseList(); + response = DocEng.generateLicenseListJson(); } _connection->sendJson(wrappedPayload(response)); diff --git a/src/documentation/documentationengine.cpp b/src/documentation/documentationengine.cpp index b4d8f9e8d3..f65fb810ad 100644 --- a/src/documentation/documentationengine.cpp +++ b/src/documentation/documentationengine.cpp @@ -131,7 +131,7 @@ namespace { constexpr const char* FiltersKey = "filters"; constexpr const char* ActionsKey = "actions"; - nlohmann::json generateJsonDocumentation( + nlohmann::json documentationToJson( const openspace::documentation::Documentation& d) { using namespace openspace::documentation; @@ -177,7 +177,7 @@ namespace { Documentation doc = { .entries = tv->documentations }; // Since this is a table we need to recurse this function to extract data - nlohmann::json restrictions = generateJsonDocumentation(doc); + nlohmann::json restrictions = documentationToJson(doc); entry[RestrictionsKey] = restrictions; } else { @@ -190,7 +190,7 @@ namespace { return json; } - nlohmann::json createPropertyJson(openspace::properties::PropertyOwner* owner) { + nlohmann::json propertyOwnerToJson(openspace::properties::PropertyOwner* owner) { ZoneScoped; using namespace openspace; @@ -218,7 +218,7 @@ namespace { for (properties::PropertyOwner* o : owner->propertySubOwners()) { nlohmann::json propertyOwner; - json[PropertyOwnersKey].push_back(createPropertyJson(o)); + json[PropertyOwnersKey].push_back(propertyOwnerToJson(o)); } sortJson(json[PropertyOwnersKey], NameKey); @@ -327,7 +327,7 @@ nlohmann::json DocumentationEngine::generateScriptEngineJson() const { return json; } -nlohmann::json DocumentationEngine::generateLicensesGroupedByLicense() const { +nlohmann::json DocumentationEngine::generateLicenseGroupsJson() const { nlohmann::json json; if (global::profile->meta.has_value()) { @@ -393,7 +393,7 @@ nlohmann::json DocumentationEngine::generateLicensesGroupedByLicense() const { return result; } -nlohmann::json DocumentationEngine::generateLicenseList() const { +nlohmann::json DocumentationEngine::generateLicenseListJson() const { nlohmann::json json; if (global::profile->meta.has_value()) { @@ -503,7 +503,7 @@ nlohmann::json DocumentationEngine::generateFactoryManagerJson() const { [&factoryInfo](const Documentation& d) { return d.name == factoryInfo.name; } ); if (factoryDoc != docs.end()) { - nlohmann::json documentation = generateJsonDocumentation(*factoryDoc); + nlohmann::json documentation = documentationToJson(*factoryDoc); factory[ClassesKey].push_back(documentation); // Remove documentation from list check at the end if all docs got put in docs.erase(factoryDoc); @@ -524,7 +524,7 @@ nlohmann::json DocumentationEngine::generateFactoryManagerJson() const { [&c](const Documentation& d) { return d.name == c; } ); if (found != docs.end()) { - nlohmann::json documentation = generateJsonDocumentation(*found); + nlohmann::json documentation = documentationToJson(*found); factory[ClassesKey].push_back(documentation); docs.erase(found); } @@ -544,7 +544,7 @@ nlohmann::json DocumentationEngine::generateFactoryManagerJson() const { leftovers[IdentifierKey] = OtherIdentifierName; for (const Documentation& doc : docs) { - leftovers[ClassesKey].push_back(generateJsonDocumentation(doc)); + leftovers[ClassesKey].push_back(documentationToJson(doc)); } sortJson(leftovers[ClassesKey], NameKey); json.push_back(leftovers); @@ -590,7 +590,7 @@ nlohmann::json DocumentationEngine::generatePropertyOwnerJson( std::vector subOwners = owner->propertySubOwners(); for (properties::PropertyOwner* o : subOwners) { if (o->identifier() != SceneTitle) { - nlohmann::json jsonOwner = createPropertyJson(o); + nlohmann::json jsonOwner = propertyOwnerToJson(o); json.push_back(jsonOwner); } @@ -631,7 +631,7 @@ void DocumentationEngine::writeDocumentation() const { nlohmann::json scripting = generateScriptEngineJson(); nlohmann::json factory = generateFactoryManagerJson(); nlohmann::json keybindings = generateKeybindingsJson(); - nlohmann::json license = generateLicensesGroupedByLicense(); + nlohmann::json license = generateLicenseGroupsJson(); nlohmann::json sceneProperties = settings.get(); nlohmann::json sceneGraph = sceneJson.get(); nlohmann::json actions = generateActionJson();