| POST | /users_roles |
|---|
import 'package:servicestack/servicestack.dart';
class UsersRolesAddResponse implements IConvertible
{
// @DataMember(Order=2)
int? appUserId;
// @DataMember(Order=3)
int? rolesId;
// @DataMember(Order=5)
ResponseStatus? responseStatus;
UsersRolesAddResponse({this.appUserId,this.rolesId,this.responseStatus});
UsersRolesAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
appUserId = json['appUserId'];
rolesId = json['rolesId'];
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'appUserId': appUserId,
'rolesId': rolesId,
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "UsersRolesAddResponse";
TypeContext? context = _ctx;
}
// @DataContract
class UsersRolesAdd implements IConvertible
{
// @DataMember(Order=2)
// @Validate(Validator="NotNull")
int? appUserId;
// @DataMember(Order=3)
// @Validate(Validator="NotNull")
int? rolesId;
UsersRolesAdd({this.appUserId,this.rolesId});
UsersRolesAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
appUserId = json['appUserId'];
rolesId = json['rolesId'];
return this;
}
Map<String, dynamic> toJson() => {
'appUserId': appUserId,
'rolesId': rolesId
};
getTypeName() => "UsersRolesAdd";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.sfgtec.com', types: <String, TypeInfo> {
'UsersRolesAddResponse': TypeInfo(TypeOf.Class, create:() => UsersRolesAddResponse()),
'UsersRolesAdd': TypeInfo(TypeOf.Class, create:() => UsersRolesAdd()),
});
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.
POST /users_roles HTTP/1.1
Host: api.sfgtec.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"appUserId":0,"rolesId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"appUserId":0,"rolesId":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}