Package dev.relism.flash.ext.openapi
Class OpenApiBuilder
java.lang.Object
dev.relism.flash.ext.openapi.OpenApiBuilder
Assembles the OpenAPI document from what the handlers already say about themselves.
A route is documented whether or not it carries annotations: its path parameters come from
the path, its request body from the handler's own body type, its response schema from what
handle returns, and its error bodies from the one shape Flash answers failures with.
Annotations add what code cannot say — a summary, an example, a second status — and never have
to repeat what it can.
A response that several operations share is written once under components and
referenced, so the security and rate-limiting answers appear once rather than on every path.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOperation(dev.relism.flash.routing.Route route, ApiOperation op, Class<?> handlerClass) Documents one route.build()description(String description)
-
Constructor Details
-
OpenApiBuilder
public OpenApiBuilder()
-
-
Method Details
-
title
-
version
-
description
-
addOperation
public void addOperation(dev.relism.flash.routing.Route route, ApiOperation op, Class<?> handlerClass) Documents one route.opis optional: a route without it is still an operation. A handler markedUndocumentedis left out entirely. -
build
-