Spec creates an OpenAPI 3.0 specification document for the API.
()
| 178 | |
| 179 | // Spec creates an OpenAPI 3.0 specification document for the API. |
| 180 | func (api *API) Spec() (spec *openapi3.T, err error) { |
| 181 | spec, err = api.createOpenAPI() |
| 182 | if err != nil { |
| 183 | return |
| 184 | } |
| 185 | return |
| 186 | } |
| 187 | |
| 188 | // Route upserts a route to the API definition. |
| 189 | func (api *API) Route(method, pattern string) (r *Route) { |