diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 9ed02e3dd23..fea2bd19a7a 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -57,6 +57,7 @@ declare -a scripts=( "./bin/groovy-petstore.sh" "./bin/apex-petstore.sh" "./bin/perl-petstore-all.sh" +"./bin/dart-jaguar-petstore.sh" #"./bin/elm-petstore-all.sh" "./bin/meta-codegen.sh" # OTHERS diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION index 06b5019af3f..2f81801b794 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/README.md b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/README.md index a29cf5ec8d9..693df464eb0 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/README.md +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/README.md @@ -54,7 +54,7 @@ import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth //openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; -final jaguarApiGen = JaguarApiGen(); +final jaguarApiGen = Openapi(); var api_instance = jaguarApiGen.getPetApi(); var body = new Pet(); // Pet | Pet object that needs to be added to the store diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/UserApi.md b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/UserApi.md index d525910db9f..24494bd8757 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/UserApi.md +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/UserApi.md @@ -84,7 +84,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -124,7 +124,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/api.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/api.dart index 5d67c1e7412..d077b86fe99 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/api.dart +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/api.dart @@ -29,7 +29,7 @@ final _jsonJaguarRepo = JsonRepo() ..add(TagSerializer()) ..add(UserSerializer()) ; -final Map _converters = { +final Map defaultConverters = { MimeTypes.json: _jsonJaguarRepo, }; @@ -37,7 +37,7 @@ final Map _converters = { final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; -class JaguarApiGen { +class Openapi { List interceptors; String basePath = "http://petstore.swagger.io/v2"; Route _baseRoute; @@ -46,7 +46,7 @@ class JaguarApiGen { /** * Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added) */ - JaguarApiGen({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) { + Openapi({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) { _baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? IOClient()); if(interceptors == null) { this.interceptors = _defaultInterceptors; @@ -86,7 +86,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return PetApi(base: base, converters: converters, timeout: timeout); } @@ -101,7 +101,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return StoreApi(base: base, converters: converters, timeout: timeout); } @@ -116,7 +116,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return UserApi(base: base, converters: converters, timeout: timeout); } diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/api_response.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/api_response.dart index a5038084041..9c95a72bc65 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/api_response.dart +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/api_response.dart @@ -5,13 +5,13 @@ part 'api_response.jser.dart'; class ApiResponse { - @Alias('code') + @Alias('code', isNullable: false) final int code; - @Alias('type') + @Alias('type', isNullable: false) final String type; - @Alias('message') + @Alias('message', isNullable: false) final String message; diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/category.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/category.dart index 74d4c1b73b2..2b4b2d27308 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/category.dart +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/category.dart @@ -5,10 +5,10 @@ part 'category.jser.dart'; class Category { - @Alias('id') + @Alias('id', isNullable: false) final int id; - @Alias('name') + @Alias('name', isNullable: false) final String name; diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/order.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/order.dart index 5cec761dc14..c4fc5175f70 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/order.dart +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/order.dart @@ -5,22 +5,22 @@ part 'order.jser.dart'; class Order { - @Alias('id') + @Alias('id', isNullable: false) final int id; - @Alias('petId') + @Alias('petId', isNullable: false) final int petId; - @Alias('quantity') + @Alias('quantity', isNullable: false) final int quantity; - @Alias('shipDate') + @Alias('shipDate', isNullable: false) final DateTime shipDate; /* Order Status */ - @Alias('status') + @Alias('status', isNullable: false) final String status; //enum statusEnum { placed, approved, delivered, }; - @Alias('complete') + @Alias('complete', isNullable: false) final bool complete; diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/pet.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/pet.dart index b7486615113..a9eb6c6b332 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/pet.dart +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/pet.dart @@ -9,22 +9,22 @@ part 'pet.jser.dart'; class Pet { - @Alias('id') + @Alias('id', isNullable: false) final int id; - @Alias('category') + @Alias('category', isNullable: false) final Category category; - @Alias('name') + @Alias('name', isNullable: false) final String name; - @Alias('photoUrls') + @Alias('photoUrls', isNullable: false) final List photoUrls; - @Alias('tags') + @Alias('tags', isNullable: false) final List tags; /* pet status in the store */ - @Alias('status') + @Alias('status', isNullable: false) final String status; //enum statusEnum { available, pending, sold, }; diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/tag.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/tag.dart index 4ddc8b834af..5fea9c025ec 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/tag.dart +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/tag.dart @@ -5,10 +5,10 @@ part 'tag.jser.dart'; class Tag { - @Alias('id') + @Alias('id', isNullable: false) final int id; - @Alias('name') + @Alias('name', isNullable: false) final String name; diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/user.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/user.dart index e8d48c6f9b6..abfbd56c88f 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/user.dart +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/model/user.dart @@ -5,28 +5,28 @@ part 'user.jser.dart'; class User { - @Alias('id') + @Alias('id', isNullable: false) final int id; - @Alias('username') + @Alias('username', isNullable: false) final String username; - @Alias('firstName') + @Alias('firstName', isNullable: false) final String firstName; - @Alias('lastName') + @Alias('lastName', isNullable: false) final String lastName; - @Alias('email') + @Alias('email', isNullable: false) final String email; - @Alias('password') + @Alias('password', isNullable: false) final String password; - @Alias('phone') + @Alias('phone', isNullable: false) final String phone; /* User Status */ - @Alias('userStatus') + @Alias('userStatus', isNullable: false) final int userStatus; diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/pubspec.yaml b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/pubspec.yaml index 2cd5cf8768a..8383211f437 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/pubspec.yaml +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/pubspec.yaml @@ -4,9 +4,9 @@ description: OpenAPI API client environment: sdk: ">=2.0.0 <3.0.0" dependencies: - jaguar_retrofit: '^2.8.2' - jaguar_serializer: '^2.2.6' + jaguar_retrofit: ^2.8.8 + jaguar_serializer: ^2.2.12 dev_dependencies: - jaguar_retrofit_gen: '^2.8.5' - jaguar_serializer_cli: '^2.2.5' - build_runner: '^1.1.1' \ No newline at end of file + jaguar_retrofit_gen: ^2.8.10 + jaguar_serializer_cli: ^2.2.8 + build_runner: ^1.6.5 diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION index 06b5019af3f..2f81801b794 100644 --- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/README.md b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/README.md index a29cf5ec8d9..693df464eb0 100644 --- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/README.md +++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/README.md @@ -54,7 +54,7 @@ import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth //openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; -final jaguarApiGen = JaguarApiGen(); +final jaguarApiGen = Openapi(); var api_instance = jaguarApiGen.getPetApi(); var body = new Pet(); // Pet | Pet object that needs to be added to the store diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/docs/UserApi.md b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/docs/UserApi.md index 3db291415f8..91cad43d7a1 100644 --- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/docs/UserApi.md +++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/docs/UserApi.md @@ -84,7 +84,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -124,7 +124,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/lib/api.dart b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/lib/api.dart index f81210751be..60148b8f584 100644 --- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/lib/api.dart +++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/lib/api.dart @@ -39,7 +39,7 @@ final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true) ..add((data) => Tag.fromBuffer(List.from(data))) ..add((data) => User.fromBuffer(List.from(data))) ; -final Map _converters = { +final Map defaultConverters = { MimeTypes.json: _jsonJaguarRepo, MimeTypes.binary: _protoJaguarRepo, }; @@ -47,7 +47,7 @@ final Map _converters = { final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; -class JaguarApiGen { +class Openapi { List interceptors; String basePath = "http://petstore.swagger.io/v2"; Route _baseRoute; @@ -56,7 +56,7 @@ class JaguarApiGen { /** * Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added) */ - JaguarApiGen({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) { + Openapi({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) { _baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? IOClient()); if(interceptors == null) { this.interceptors = _defaultInterceptors; @@ -96,7 +96,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return PetApi(base: base, converters: converters, timeout: timeout); } @@ -111,7 +111,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return StoreApi(base: base, converters: converters, timeout: timeout); } @@ -126,7 +126,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return UserApi(base: base, converters: converters, timeout: timeout); } diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/pubspec.yaml b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/pubspec.yaml index 39b3af4b4cd..94a77f5993f 100644 --- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/pubspec.yaml +++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/pubspec.yaml @@ -4,9 +4,9 @@ description: OpenAPI API client environment: sdk: ">=2.0.0 <3.0.0" dependencies: - jaguar_retrofit: '^2.8.2' - jaguar_serializer_protobuf: '^2.2.2' - jaguar_mimetype: '^1.0.1' + jaguar_retrofit: ^2.8.8 + jaguar_serializer_protobuf: ^2.2.2 + jaguar_mimetype: ^1.0.1 dev_dependencies: - jaguar_retrofit_gen: '^2.8.5' - build_runner: '^1.1.1' \ No newline at end of file + jaguar_retrofit_gen: ^2.8.10 + build_runner: ^1.6.5 diff --git a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION index 717311e32e3..2f81801b794 100644 --- a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -unset \ No newline at end of file +4.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION index 06b5019af3f..2f81801b794 100644 --- a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/README.md b/samples/client/petstore/dart-jaguar/openapi_proto/README.md index a29cf5ec8d9..693df464eb0 100644 --- a/samples/client/petstore/dart-jaguar/openapi_proto/README.md +++ b/samples/client/petstore/dart-jaguar/openapi_proto/README.md @@ -54,7 +54,7 @@ import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth //openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; -final jaguarApiGen = JaguarApiGen(); +final jaguarApiGen = Openapi(); var api_instance = jaguarApiGen.getPetApi(); var body = new Pet(); // Pet | Pet object that needs to be added to the store diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/docs/UserApi.md b/samples/client/petstore/dart-jaguar/openapi_proto/docs/UserApi.md index 3db291415f8..91cad43d7a1 100644 --- a/samples/client/petstore/dart-jaguar/openapi_proto/docs/UserApi.md +++ b/samples/client/petstore/dart-jaguar/openapi_proto/docs/UserApi.md @@ -84,7 +84,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type @@ -124,7 +124,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](List.md)| List of user object | + **body** | [**List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/lib/api.dart b/samples/client/petstore/dart-jaguar/openapi_proto/lib/api.dart index f81210751be..60148b8f584 100644 --- a/samples/client/petstore/dart-jaguar/openapi_proto/lib/api.dart +++ b/samples/client/petstore/dart-jaguar/openapi_proto/lib/api.dart @@ -39,7 +39,7 @@ final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true) ..add((data) => Tag.fromBuffer(List.from(data))) ..add((data) => User.fromBuffer(List.from(data))) ; -final Map _converters = { +final Map defaultConverters = { MimeTypes.json: _jsonJaguarRepo, MimeTypes.binary: _protoJaguarRepo, }; @@ -47,7 +47,7 @@ final Map _converters = { final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; -class JaguarApiGen { +class Openapi { List interceptors; String basePath = "http://petstore.swagger.io/v2"; Route _baseRoute; @@ -56,7 +56,7 @@ class JaguarApiGen { /** * Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added) */ - JaguarApiGen({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) { + Openapi({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) { _baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? IOClient()); if(interceptors == null) { this.interceptors = _defaultInterceptors; @@ -96,7 +96,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return PetApi(base: base, converters: converters, timeout: timeout); } @@ -111,7 +111,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return StoreApi(base: base, converters: converters, timeout: timeout); } @@ -126,7 +126,7 @@ class JaguarApiGen { base = _baseRoute; } if(converters == null) { - converters = _converters; + converters = defaultConverters; } return UserApi(base: base, converters: converters, timeout: timeout); } diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/pubspec.yaml b/samples/client/petstore/dart-jaguar/openapi_proto/pubspec.yaml index 39b3af4b4cd..94a77f5993f 100644 --- a/samples/client/petstore/dart-jaguar/openapi_proto/pubspec.yaml +++ b/samples/client/petstore/dart-jaguar/openapi_proto/pubspec.yaml @@ -4,9 +4,9 @@ description: OpenAPI API client environment: sdk: ">=2.0.0 <3.0.0" dependencies: - jaguar_retrofit: '^2.8.2' - jaguar_serializer_protobuf: '^2.2.2' - jaguar_mimetype: '^1.0.1' + jaguar_retrofit: ^2.8.8 + jaguar_serializer_protobuf: ^2.2.2 + jaguar_mimetype: ^1.0.1 dev_dependencies: - jaguar_retrofit_gen: '^2.8.5' - build_runner: '^1.1.1' \ No newline at end of file + jaguar_retrofit_gen: ^2.8.10 + build_runner: ^1.6.5