Fast: Documentation is generated transparently before announcing roots and does not appear anywhere further on
OpenAPI 3 generation. All registered routes are collected in a global rest.API and can be exported with Api.Spec().
Generic route registration: Define handlers with input and output types using helpers like RegisterHandlerIO or Fiber adapter functions such as GetIO. The library automatically registers the models in the API specification.
Context aware DTOs. Structs implementing AwareCtx receive the current request context allowing handlers to access request data directly.
Support GET, POST, PUT, DELETE methods
Automatically decode and validate query string(GET and DELETE)
Automatically decode and validate JSON body(POST and PUT)
Customisable schemas. Use rest.ModelOpts like WithDescription, WithNullable or WithEnumValues to fine tune the generated schema.
The library revolves around a global instance of Api created via SetupApi.
Handlers are registered using the generic helper functions from.
Once all handlers have been added, call Api.Spec() to get
the value of openapi3.T and represent it as JSON.
How to test.
make run_tests
# If coverage needed
make run_coverage_test