documentPaths method Null safety

  1. @override
Map<String, APIPath> documentPaths(
  1. APIDocumentContext context
)
override

Tells this object to return all APIPaths it handles.

This method is implemented by Router to provide the paths of an OpenAPI document and typically shouldn't be overridden by another controller.

Implementation

@override
Map<String, APIPath> documentPaths(APIDocumentContext context) {
  return _routeControllers.fold(<String, APIPath>{}, (prev, elem) {
    prev.addAll(elem.documentPaths(context));
    return prev;
  });
}