refactor: simplify endpoint and capabilities

This commit is contained in:
2025-09-13 19:15:07 +02:00
parent 12caeb0be6
commit 72b559e047
18 changed files with 1055 additions and 40 deletions

View File

@@ -30,14 +30,19 @@ public:
const std::vector<ParamSpec>& params);
static const char* methodToStr(int method);
// Access to endpoints for endpoints endpoint
const std::vector<EndpointInfo>& getEndpoints() const { return endpoints; }
private:
AsyncWebServer server;
NodeContext& ctx;
TaskManager& taskManager;
std::vector<std::reference_wrapper<Service>> services;
std::vector<std::tuple<String, int>> serviceRegistry;
std::vector<EndpointInfo> endpoints; // Single source of truth for endpoints
// Internal helpers
void registerServiceForLocalNode(const String& uri, int method);
void registerEndpoint(const String& uri, int method,
const std::vector<ParamSpec>& params,
const String& serviceName);
};