Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import 'package:{{pubName}}/{{pubName}}.dart';
void main() {
{{^isEnum}}
{{! Due to required vars without default value we can not create a full instance here }}
final instance = {{{classname}}}Builder();
// TODO add properties to the builder and call build()
{{#includeLibraryTemplate}}test_instance{{/includeLibraryTemplate}}
{{/isEnum}}

group({{{classname}}}, () {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
final instance = {{{classname}}}Builder();
// TODO add properties to the builder and call build()
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ enum {{{classname}}} {
{{#description}}
/// {{{.}}}
{{/description}}
@JsonValue(r{{{value}}})
@JsonValue({{#isString}}r{{/isString}}{{{value}}})
{{{name}}},
{{/enumVars}}
{{/allowableValues}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
enum {{{ enumName }}} {
{{#allowableValues}}
{{#enumVars}}
@JsonValue(r{{{value}}})
@JsonValue({{#isString}}r{{/isString}}{{{value}}})
{{{name}}},
{{/enumVars}}
{{/allowableValues}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
final {{{classname}}}? instance = /* {{{classname}}}(...) */ null;
// TODO add properties to the entity
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,7 @@
<modules>
<module>samples/openapi3/client/petstore/dart2/petstore_client_lib</module>
<module>samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake</module>
<module>samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib-json_serializable</module>
</modules>
</profile>
<profile>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,57 @@ lib/src/model/tag.dart
lib/src/model/user.dart
lib/src/model/user_type.dart
pubspec.yaml
test/additional_properties_class_test.dart
test/animal_test.dart
test/another_fake_api_test.dart
test/api_response_test.dart
test/array_of_array_of_number_only_test.dart
test/array_of_number_only_test.dart
test/array_test_test.dart
test/capitalization_test.dart
test/cat_all_of_test.dart
test/cat_test.dart
test/category_test.dart
test/class_model_test.dart
test/default_api_test.dart
test/deprecated_object_test.dart
test/dog_all_of_test.dart
test/dog_test.dart
test/enum_arrays_test.dart
test/enum_test_test.dart
test/fake_api_test.dart
test/fake_classname_tags123_api_test.dart
test/file_schema_test_class_test.dart
test/foo_test.dart
test/format_test_test.dart
test/has_only_read_only_test.dart
test/health_check_result_test.dart
test/inline_response_default_test.dart
test/map_test_test.dart
test/mixed_properties_and_additional_properties_class_test.dart
test/model200_response_test.dart
test/model_client_test.dart
test/model_enum_class_test.dart
test/model_file_test.dart
test/model_list_test.dart
test/model_return_test.dart
test/name_test.dart
test/nullable_class_test.dart
test/number_only_test.dart
test/object_with_deprecated_fields_test.dart
test/order_test.dart
test/outer_composite_test.dart
test/outer_enum_default_value_test.dart
test/outer_enum_integer_default_value_test.dart
test/outer_enum_integer_test.dart
test/outer_enum_test.dart
test/outer_object_with_enum_property_test.dart
test/pet_api_test.dart
test/pet_test.dart
test/read_only_first_test.dart
test/special_model_name_test.dart
test/store_api_test.dart
test/tag_test.dart
test/user_api_test.dart
test/user_test.dart
test/user_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,22 +194,22 @@ enum EnumTestEnumStringRequiredEnum {


enum EnumTestEnumIntegerEnum {
@JsonValue(r1)
@JsonValue(1)
number1,
@JsonValue(r-1)
@JsonValue(-1)
numberNegative1,
@JsonValue(r11184809)
@JsonValue(11184809)
unknownDefaultOpenApi,
}



enum EnumTestEnumNumberEnum {
@JsonValue(r'1.1')
@JsonValue('1.1')
number1Period1,
@JsonValue(r'-1.2')
@JsonValue('-1.2')
numberNegative1Period2,
@JsonValue(r'11184809')
@JsonValue('11184809')
unknownDefaultOpenApi,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import 'package:json_annotation/json_annotation.dart';


enum OuterEnumInteger {
@JsonValue(r0)
@JsonValue(0)
number0,
@JsonValue(r1)
@JsonValue(1)
number1,
@JsonValue(r2)
@JsonValue(2)
number2,
@JsonValue(r11184809)
@JsonValue(11184809)
unknownDefaultOpenApi,
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import 'package:json_annotation/json_annotation.dart';


enum OuterEnumIntegerDefaultValue {
@JsonValue(r0)
@JsonValue(0)
number0,
@JsonValue(r1)
@JsonValue(1)
number1,
@JsonValue(r2)
@JsonValue(2)
number2,
@JsonValue(r11184809)
@JsonValue(11184809)
unknownDefaultOpenApi,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>DartDioNextPetstoreClientLibFakeJsonSerializableTests</artifactId>
<packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>DartDioNext Petstore Client Lib Fake Json Serializable</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>pub-get</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>pub</executable>
<arguments>
<argument>get</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>pub-run-build-runner</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>pub</executable>
<arguments>
<argument>run</argument>
<argument>build_runner</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>dart-analyze</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>dart</executable>
<arguments>
<argument>analyze</argument>
<argument>--fatal-infos</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>dart-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>dart</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:openapi/openapi.dart';

// tests for AdditionalPropertiesClass
void main() {
final instance = AdditionalPropertiesClassBuilder();
// TODO add properties to the builder and call build()
final AdditionalPropertiesClass? instance = /* AdditionalPropertiesClass(...) */ null;
// TODO add properties to the entity

group(AdditionalPropertiesClass, () {
// Map<String, String> mapProperty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:openapi/openapi.dart';

// tests for Animal
void main() {
final instance = AnimalBuilder();
// TODO add properties to the builder and call build()
final Animal? instance = /* Animal(...) */ null;
// TODO add properties to the entity

group(Animal, () {
// String className
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:openapi/openapi.dart';

// tests for ApiResponse
void main() {
final instance = ApiResponseBuilder();
// TODO add properties to the builder and call build()
final ApiResponse? instance = /* ApiResponse(...) */ null;
// TODO add properties to the entity

group(ApiResponse, () {
// int code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:openapi/openapi.dart';

// tests for ArrayOfArrayOfNumberOnly
void main() {
final instance = ArrayOfArrayOfNumberOnlyBuilder();
// TODO add properties to the builder and call build()
final ArrayOfArrayOfNumberOnly? instance = /* ArrayOfArrayOfNumberOnly(...) */ null;
// TODO add properties to the entity

group(ArrayOfArrayOfNumberOnly, () {
// List<List<num>> arrayArrayNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:openapi/openapi.dart';

// tests for ArrayOfNumberOnly
void main() {
final instance = ArrayOfNumberOnlyBuilder();
// TODO add properties to the builder and call build()
final ArrayOfNumberOnly? instance = /* ArrayOfNumberOnly(...) */ null;
// TODO add properties to the entity

group(ArrayOfNumberOnly, () {
// List<num> arrayNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:openapi/openapi.dart';

// tests for ArrayTest
void main() {
final instance = ArrayTestBuilder();
// TODO add properties to the builder and call build()
final ArrayTest? instance = /* ArrayTest(...) */ null;
// TODO add properties to the entity

group(ArrayTest, () {
// List<String> arrayOfString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:openapi/openapi.dart';

// tests for Capitalization
void main() {
final instance = CapitalizationBuilder();
// TODO add properties to the builder and call build()
final Capitalization? instance = /* Capitalization(...) */ null;
// TODO add properties to the entity

group(Capitalization, () {
// String smallCamel
Expand Down
Loading