Files
moloapp/tests/example/openapi/docs_test.cpp
T
retoor 3c4334cec9 feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security,
data, app, realtime, supervisor, clients, CLI, example plus
enterprise tenancy, audit, operability, governance,
supplychain. Postgres via docker compose for tests.
2026-10-23 18:20:04 +02:00

17 lines
555 B
C++

// Routes: GET /openapi.json and GET /docs
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto spec = f.client->get("/openapi.json");
check(spec.status == 200, "spec status 200");
check(contains(spec.body, "\"openapi\":\"3.0.0\""), "openapi version");
check(contains(spec.body, "/health"), "health path listed");
auto docs = f.client->get("/docs");
check(docs.status == 200, "docs status 200");
check(contains(docs.body, "/openapi.json"), "docs link spec");
return finish("openapi/docs");
}