| Requires any of the roles: | Worker, Agent, Administrator |
| GET,OPTIONS | /v1/Skill |
|---|
import 'package:servicestack/servicestack.dart';
class Skill implements IConvertible
{
int? SkillID;
String? Name;
Skill({this.SkillID,this.Name});
Skill.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SkillID = json['SkillID'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'SkillID': SkillID,
'Name': Name
};
getTypeName() => "Skill";
TypeContext? context = _ctx;
}
class SkillListResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<Skill>? Skills = [];
SkillListResponse({this.ResponseStatus,this.Skills});
SkillListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Skills = JsonConverters.fromJson(json['Skills'],'List<Skill>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Skills': JsonConverters.toJson(Skills,'List<Skill>',context!)
};
getTypeName() => "SkillListResponse";
TypeContext? context = _ctx;
}
class SkillListRequest implements IConvertible
{
SkillListRequest();
SkillListRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "SkillListRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'Skill': TypeInfo(TypeOf.Class, create:() => Skill()),
'SkillListResponse': TypeInfo(TypeOf.Class, create:() => SkillListResponse()),
'List<Skill>': TypeInfo(TypeOf.Class, create:() => <Skill>[]),
'SkillListRequest': TypeInfo(TypeOf.Class, create:() => SkillListRequest()),
});
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 /v1/Skill HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Skills:
[
{
SkillID: 0,
Name: String
}
]
}