Skip to content

Reference

Everything below is exported from package:gisila_doc/gisila_doc.dart, which also re-exports the gisila runtime (documented in the framework section).

Page Symbols
Route annotations Controller, Route, Get, Post, Put, Patch, Delete, Head, Options; re-exported RouteConfig, UseRouteConfig
Parameter and body annotations Path, Query, Header, Body, QueryDoc, BodyDoc
Response annotations Returns, ApiResponse, Responses, Tag
OpenApiSpec and document metadata OpenApiSpec, ApiInfo, Contact, License, ApiServer, SecurityScheme, errorEnvelopeSchema
Operation model Operation, Parameter, RequestBody, ResponseSpec, MediaType
docsHandler docsHandler
Generated code and builder generated attachToApp, controllerBuilder (package:gisila_doc/builder.dart), re-exported coerce, readJsonBody, jsonResponse, emptyResponse, BadRequestException
I want to… Use
Turn a class into routes and operations @Controller
Add summary, description, operationId @Get(...) and friends
Rename or describe a path/query parameter @Path, @Query
Take a header as a parameter @Header
Document a body the handler parses itself BodyDoc
Document query keys the handler parses itself @QueryDoc
Document the body of a raw Response @Returns(bodyType: ...)
Add a 404 / 409 / … @ApiResponse
Describe auth schemes SecurityScheme
Serve Swagger UI / Redoc docsHandler
Add an operation for a non-controller route OpenApiSpec.putOperation with Operation