mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 01:52:42 +00:00
This reverts commit dfda6655ec.
This commit is contained in:
@@ -49,8 +49,6 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String sourceFolder = "";
|
||||
protected String apiDocPath = "docs" + File.separator;
|
||||
protected String modelDocPath = "docs" + File.separator;
|
||||
protected String apiTestPath = "test" + File.separator;
|
||||
protected String modelTestPath = "test" + File.separator;
|
||||
|
||||
public DartClientCodegen() {
|
||||
super();
|
||||
@@ -68,9 +66,6 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
modelDocTemplateFiles.put("object_doc.mustache", ".md");
|
||||
apiDocTemplateFiles.put("api_doc.mustache", ".md");
|
||||
|
||||
modelTestTemplateFiles.put("model_test.mustache", ".dart");
|
||||
apiTestTemplateFiles.put("api_test.mustache", ".dart");
|
||||
|
||||
setReservedWordsLowerCase(
|
||||
Arrays.asList(
|
||||
"abstract", "as", "assert", "async", "async*", "await",
|
||||
@@ -219,7 +214,6 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -237,16 +231,6 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apiTestFileFolder() {
|
||||
return outputFolder + File.separator + apiTestPath.replace('/', File.separatorChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modelTestFileFolder() {
|
||||
return outputFolder + File.separator + modelTestPath.replace('/', File.separatorChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apiDocFileFolder() {
|
||||
return outputFolder + File.separator + apiDocPath.replace('/', File.separatorChar);
|
||||
@@ -311,16 +295,6 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
return underscore(toApiName(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toApiTestFilename(String name) {
|
||||
return toApiFilename(name) + "_test";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toModelTestFilename(String name) {
|
||||
return toModelFilename(name) + "_test";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toDefaultValue(Schema schema) {
|
||||
if (ModelUtils.isMapSchema(schema)) {
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
import 'package:{{pubName}}/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
{{#operations}}
|
||||
|
||||
/// tests for {{classname}}
|
||||
void main() {
|
||||
var instance = new {{classname}}();
|
||||
|
||||
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}}
|
||||
@@ -1,26 +0,0 @@
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
import 'package:{{pubName}}/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for {{classname}}
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
|
||||
group('test {{classname}}', () {
|
||||
{{#vars}}
|
||||
{{#description}}
|
||||
// {{{description}}}
|
||||
{{/description}}
|
||||
// {{{dataType}}} {{name}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
|
||||
test('to test the property `{{name}}`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
{{/vars}}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
@@ -3,5 +3,3 @@ version: {{pubVersion}}
|
||||
description: {{pubDescription}}
|
||||
dependencies:
|
||||
http: '>=0.11.1 <0.13.0'
|
||||
dev_dependencies:
|
||||
test: ^1.3.0
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# https://docs.travis-ci.com/user/languages/dart/
|
||||
#
|
||||
language: dart
|
||||
dart:
|
||||
# Install a specific stable release
|
||||
- "1.24.3"
|
||||
install:
|
||||
- pub get
|
||||
|
||||
script:
|
||||
- pub run test
|
||||
@@ -1,28 +0,0 @@
|
||||
import 'package:{{pubName}}/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
{{#operations}}
|
||||
|
||||
/// tests for {{classname}}
|
||||
void main() {
|
||||
var instance = new {{classname}}();
|
||||
|
||||
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}}
|
||||
@@ -1,26 +0,0 @@
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
import 'package:{{pubName}}/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for {{classname}}
|
||||
void main() {
|
||||
var instance = new Pet();
|
||||
|
||||
group('test {{classname}}', () {
|
||||
{{#vars}}
|
||||
{{#description}}
|
||||
// {{{description}}}
|
||||
{{/description}}
|
||||
// {{{dataType}}} {{name}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
|
||||
test('to test the property `{{name}}`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
{{/vars}}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
@@ -5,5 +5,3 @@ environment:
|
||||
sdk: '>=2.0.0 <3.0.0'
|
||||
dependencies:
|
||||
http: '>=0.11.1 <0.13.0'
|
||||
dev_dependencies:
|
||||
test: ^1.3.0
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# https://docs.travis-ci.com/user/languages/dart/
|
||||
#
|
||||
language: dart
|
||||
dart:
|
||||
# Install a specific stable release
|
||||
- "2.2.0"
|
||||
install:
|
||||
- pub get
|
||||
|
||||
script:
|
||||
- pub run test
|
||||
Reference in New Issue
Block a user