POST | /orgs/{OrganizationId}/labels |
---|
import 'package:servicestack/servicestack.dart';
class OrganizationLabelResponse implements IConvertible
{
ResponseStatus? responseStatus;
OrganizationLabelResponse({this.responseStatus});
OrganizationLabelResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "OrganizationLabelResponse";
TypeContext? context = _ctx;
}
class AddOrganizationLabel implements IPost, IConvertible
{
int? organizationId;
String? slug;
String? description;
String? color;
AddOrganizationLabel({this.organizationId,this.slug,this.description,this.color});
AddOrganizationLabel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
organizationId = json['organizationId'];
slug = json['slug'];
description = json['description'];
color = json['color'];
return this;
}
Map<String, dynamic> toJson() => {
'organizationId': organizationId,
'slug': slug,
'description': description,
'color': color
};
getTypeName() => "AddOrganizationLabel";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'techstacks.io', types: <String, TypeInfo> {
'OrganizationLabelResponse': TypeInfo(TypeOf.Class, create:() => OrganizationLabelResponse()),
'AddOrganizationLabel': TypeInfo(TypeOf.Class, create:() => AddOrganizationLabel()),
});
Dart AddOrganizationLabel DTOs
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 /orgs/{OrganizationId}/labels HTTP/1.1
Host: techstacks.io
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"organizationId":0,"slug":"String","description":"String","color":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}