| GET | /Vessels/Search |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class VesselSearch implements IConvertible
{
String? Search;
VesselSearch({this.Search});
VesselSearch.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Search = json['Search'];
return this;
}
Map<String, dynamic> toJson() => {
'Search': Search
};
getTypeName() => "VesselSearch";
TypeContext? context = _ctx;
}
class VesselViewModel implements IConvertible
{
int? Id;
int? IMONumber;
String? MMSI;
String? Name;
VesselViewModel({this.Id,this.IMONumber,this.MMSI,this.Name});
VesselViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
IMONumber = json['IMONumber'];
MMSI = json['MMSI'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'IMONumber': IMONumber,
'MMSI': MMSI,
'Name': Name
};
getTypeName() => "VesselViewModel";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
'VesselSearch': TypeInfo(TypeOf.Class, create:() => VesselSearch()),
'VesselViewModel': TypeInfo(TypeOf.Class, create:() => VesselViewModel()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /Vessels/Search HTTP/1.1 Host: internal.thebunkerbridge.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Id: 0,
IMONumber: 0,
MMSI: String,
Name: String
}