ROADMAP.md

This commit is contained in:
2026-01-09 20:26:11 +00:00
parent a6512c5b26
commit 7097592e64
3 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#include "json_config_schema_path_resolver.hpp"
#include <system_error>
#include <vector>
namespace sdl3cpp::services::impl::json_config {
std::filesystem::path JsonConfigSchemaPathResolver::Resolve(const std::filesystem::path& configPath) const {
const std::filesystem::path schemaFile = "runtime_config_v2.schema.json";
std::vector<std::filesystem::path> candidates;
if (!configPath.empty()) {
candidates.push_back(configPath.parent_path() / "schema" / schemaFile);
}
candidates.push_back(std::filesystem::current_path() / "config" / "schema" / schemaFile);
std::error_code ec;
for (const auto& candidate : candidates) {
if (!candidate.empty() && std::filesystem::exists(candidate, ec)) {
return candidate;
}
}
return {};
}
} // namespace sdl3cpp::services::impl::json_config

View File

@@ -0,0 +1,28 @@
#pragma once
#include <filesystem>
#include <memory>
#include <rapidjson/document.h>
namespace sdl3cpp::services {
class ILogger;
class IProbeService;
}
namespace sdl3cpp::services::impl::json_config {
class JsonConfigSchemaValidator {
public:
JsonConfigSchemaValidator(std::shared_ptr<ILogger> logger,
std::shared_ptr<IProbeService> probeService);
void ValidateOrThrow(const rapidjson::Document& document,
const std::filesystem::path& configPath) const;
private:
std::shared_ptr<ILogger> logger_;
std::shared_ptr<IProbeService> probeService_;
};
} // namespace sdl3cpp::services::impl::json_config

View File

@@ -0,0 +1,7 @@
#pragma once
namespace sdl3cpp::services::impl::json_config {
constexpr int kRuntimeConfigSchemaVersion = 2;
} // namespace sdl3cpp::services::impl::json_config