| Requires any of the roles: | Client, Admin, Partner |
| PUT | /test/{Id} |
|---|
import 'package:servicestack/servicestack.dart';
class TestEditResponse implements IConvertible
{
// @DataMember(Order=1)
int? Id;
// @DataMember(Order=2)
String? Desc;
// @DataMember(Order=4)
ResponseStatus? ResponseStatus;
TestEditResponse({this.Id,this.Desc,this.ResponseStatus});
TestEditResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Desc = json['Desc'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Desc': Desc,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "TestEditResponse";
TypeContext? context = _ctx;
}
// @DataContract
class TestEdit implements IConvertible
{
// @DataMember(Order=1)
// @Validate(Validator="NotNull")
int? Id;
// @DataMember(Order=2)
// @Validate(Validator="NotNull")
String? Desc;
TestEdit({this.Id,this.Desc});
TestEdit.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Desc = json['Desc'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Desc': Desc
};
getTypeName() => "TestEdit";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
'TestEditResponse': TypeInfo(TypeOf.Class, create:() => TestEditResponse()),
'TestEdit': TypeInfo(TypeOf.Class, create:() => TestEdit()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /test/{Id} HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Id":0,"Desc":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Id":0,"Desc":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}