Verb class abstract base

The shared shape of every verb annotation.

Anything that would otherwise need a second annotation on the method is an argument here instead, so a handler carries exactly one.

@POST('/', status: 201, summary: 'Create a todo')
Future<Todo> create(@Extract(TodosWrite) AuthUser user, @Body() CreateTodo input);
Implementers
Annotations
  • @Target.new({TargetKind.method, TargetKind.function})

Constructors

Verb(String path, {int? status, String? summary, String? description, List<String> tags = const [], List<Object> middleware = const [], String? operationId, bool deprecated = false, bool hidden = false})
Declares one route.
const

Properties

deprecated → bool
Whether the operation is marked deprecated.
final
description → String?
A longer description, for documentation tooling.
final
hashCode → int
The hash code for this object.
no setterinherited
hidden → bool
Whether the route is hidden from generated documentation.
final
method → String
The HTTP method this annotation declares.
no setter
middleware → List<Object>
Middleware applied to this handler, appended to the controller's.
final
operationId → String?
A stable id for this route. Derived from the method name when omitted.
final
path → String
The route path, relative to the controller.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → int?
The success status code. Derived from the return type when omitted.
final
summary → String?
A one-line summary, for documentation tooling.
final
tags → List<String>
Tags for this operation, appended to the controller's.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited