MCPcopy Create free account
hub / github.com/a-h/rest / Spec

Method Spec

api.go:180–186  ·  view source on GitHub ↗

Spec creates an OpenAPI 3.0 specification document for the API.

()

Source from the content-addressed store, hash-verified

178
179// Spec creates an OpenAPI 3.0 specification document for the API.
180func (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.
189func (api *API) Route(method, pattern string) (r *Route) {

Callers 4

TestSchemaFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 1

createOpenAPIMethod · 0.95

Tested by 1

TestSchemaFunction · 0.76