OpenAPI out of the box
Register a few routes, run a request in-process, then emit the OpenAPI 3.1 document the routes describe.
let app = @moonapi.App::new()
app.get("/", _ctx => @moonapi.text(200, "Hello from moonapi"))
app.get(
"/users/{id}",
ctx => @moonapi.text(200, "user " + ctx.param("id").unwrap()),
summary="fetch a user",
)
app.post(
"/users",
_ctx => @moonapi.text(201, "created"),
summary="create a user",
)