| All Verbs | /{Brand}/browse/{BrowseType}/ | ||
|---|---|---|---|
| All Verbs | /{Brand}/browse/{BrowseType}/{Path} |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
enum Brand
{
Desktop,
Hp,
Kyocera,
NeaScan,
Samsung,
FujiXerox,
Ta,
Utax,
Epson,
ScanFront400,
Sharp,
Ricoh,
FujiFilm,
}
class DtoBase implements IConvertible
{
Brand? Brand;
DtoBase({this.Brand});
DtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Brand = JsonConverters.fromJson(json['Brand'],'Brand',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Brand': JsonConverters.toJson(Brand,'Brand',context!)
};
getTypeName() => "DtoBase";
TypeContext? context = _ctx;
}
class RequestBase extends DtoBase implements IConvertible
{
RequestBase();
RequestBase.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "RequestBase";
TypeContext? context = _ctx;
}
class BrowseRequest extends RequestBase implements IConvertible
{
String? Path;
BrowseRequest({this.Path});
BrowseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Path = json['Path'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Path': Path
});
getTypeName() => "BrowseRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'buildmax.org', types: <String, TypeInfo> {
'Brand': TypeInfo(TypeOf.Enum, enumValues:Brand.values),
'DtoBase': TypeInfo(TypeOf.Class, create:() => DtoBase()),
'RequestBase': TypeInfo(TypeOf.Class, create:() => RequestBase()),
'BrowseRequest': TypeInfo(TypeOf.Class, create:() => BrowseRequest()),
});
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.
POST /{Brand}/browse/{BrowseType}/ HTTP/1.1
Host: buildmax.org
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Path: String,
Brand: Desktop
}