apiLocation property Null safety

APIParameterLocation apiLocation

Implementation

APIParameterLocation get apiLocation {
  switch (location) {
    case BindingType.body:
      throw StateError('body parameters do not have a location');
    case BindingType.header:
      return APIParameterLocation.header;
    case BindingType.query:
      return APIParameterLocation.query;
    case BindingType.path:
      return APIParameterLocation.path;
  }
}