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

Method HasRequestModel

api.go:271–274  ·  view source on GitHub ↗

HasResponseModel configures the request model of the route. Example: api.Post("/user").HasRequestModel(http.StatusOK, rest.ModelOf[User]())

(request Model)

Source from the content-addressed store, hash-verified

269//
270// api.Post("/user").HasRequestModel(http.StatusOK, rest.ModelOf[User]())
271func (rm *Route) HasRequestModel(request Model) *Route {
272 rm.Models.Request = request
273 return rm
274}
275
276// HasPathParameter configures a path parameter for the route.
277func (rm *Route) HasPathParameter(name string, p PathParam) *Route {

Callers 3

TestSchemaFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestSchemaFunction · 0.64