dart2-v3template.api_test.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-dart-generator Show documentation
Show all versions of openapi-dart-generator Show documentation
dart2 generator from openapi 3.x spec files.
import 'package:{{pubName}}/api.dart';
import 'package:openapi_dart_common/openapi.dart';
import 'package:test/test.dart';
{{#operations}}
/// tests for {{classname}}
void main() {
var instance = {{classname}}(ApiClient());
group('tests for {{classname}}', () {
{{#operation}}
{{#summary}}
// {{{.}}}
//
{{/summary}}
{{#notes}}
// {{{.}}}
//
{{/notes}}
//{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{operationId}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async
test('test {{operationId}}', () async {
// TODO
});
{{/operation}}
});
}
{{/operations}}