Skip to content

Instantly share code, notes, and snippets.

@tritao
Created July 5, 2021 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tritao/fde9fb18ad79abd9c91a6d473828fc61 to your computer and use it in GitHub Desktop.
Save tritao/fde9fb18ad79abd9c91a6d473828fc61 to your computer and use it in GitHub Desktop.
/* Options:
Date: 2021-07-05 18:21:21
Version: 5.111
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://localhost:5001
//GlobalNamespace:
//AddServiceStackTypes: True
//AddResponseStatus: False
//AddImplicitVersion:
//AddDescriptionAsComments: True
//IncludeTypes:
//ExcludeTypes:
//DefaultImports: package:servicestack/servicestack.dart
*/
import 'package:servicestack/servicestack.dart';
class HelloResponse implements IConvertible
{
String? result;
HelloResponse({this.result});
HelloResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
result = json['result'];
return this;
}
Map<String, dynamic> toJson() => {
'result': result
};
getTypeName() => "HelloResponse";
TypeContext? context = _ctx;
}
// @Route("/hello")
// @Route("/hello/{Name}")
class Hello implements IReturn<HelloResponse>, IConvertible
{
String? name;
Hello({this.name});
Hello.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name
};
createResponse() => HelloResponse();
getResponseTypeName() => "HelloResponse";
getTypeName() => "Hello";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'localhost', types: <String, TypeInfo> {
'HelloResponse': TypeInfo(TypeOf.Class, create:() => HelloResponse()),
'Hello': TypeInfo(TypeOf.Class, create:() => Hello()),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment