Class OpenApiBuilder

java.lang.Object
dev.relism.flash.ext.openapi.OpenApiBuilder

public final class OpenApiBuilder extends Object
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 Details

    • OpenApiBuilder

      public OpenApiBuilder()
  • Method Details