forked from loafle/openapi-generator-original
[dart-jaguar] Makes converters publicly accessible so they can be used serialization/deserlization outside of the API client (#3245)
This commit is contained in:
committed by
William Cheng
parent
0cb921251d
commit
310f5feda0
@@ -21,7 +21,7 @@ import 'package:jaguar_mimetype/jaguar_mimetype.dart';
|
||||
final _jsonJaguarRepo = JsonRepo()
|
||||
{{#models}}{{#model}}..add({{classname}}Serializer())
|
||||
{{/model}}{{/models}};
|
||||
final Map<String, CodecRepo> _converters = {
|
||||
final Map<String, CodecRepo> converters = {
|
||||
MimeTypes.json: _jsonJaguarRepo,
|
||||
};
|
||||
{{/jsonFormat}}
|
||||
@@ -33,7 +33,7 @@ final _protoJaguarRepo = ProtoCodecRepo()
|
||||
final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true)
|
||||
{{#models}}{{#model}}..add((data) => {{classname}}.fromBuffer(List<int>.from(data)))
|
||||
{{/model}}{{/models}};
|
||||
final Map<String, CodecRepo> _converters = {
|
||||
final Map<String, CodecRepo> converters = {
|
||||
MimeTypes.json: _jsonJaguarRepo,
|
||||
MimeTypes.binary: _protoJaguarRepo,
|
||||
};
|
||||
@@ -91,7 +91,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return {{classname}}(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.0.1-SNAPSHOT
|
||||
4.0.3-SNAPSHOT
|
||||
@@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke
|
||||
This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Build date: 2019-05-27T21:20:43.835+08:00[Asia/Hong_Kong]
|
||||
- Build date: 2019-06-29T11:26:01.157+12:00[Pacific/Auckland]
|
||||
- Build package: org.openapitools.codegen.languages.DartJaguarClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ final _jsonJaguarRepo = JsonRepo()
|
||||
..add(TagSerializer())
|
||||
..add(UserSerializer())
|
||||
;
|
||||
final Map<String, CodecRepo> _converters = {
|
||||
final Map<String, CodecRepo> converters = {
|
||||
MimeTypes.json: _jsonJaguarRepo,
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return PetApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return StoreApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return UserApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.0.1-SNAPSHOT
|
||||
4.0.3-SNAPSHOT
|
||||
@@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke
|
||||
This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Build date: 2019-05-27T21:20:45.456+08:00[Asia/Hong_Kong]
|
||||
- Build date: 2019-06-29T11:26:04.013+12:00[Pacific/Auckland]
|
||||
- Build package: org.openapitools.codegen.languages.DartJaguarClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true)
|
||||
..add((data) => Tag.fromBuffer(List<int>.from(data)))
|
||||
..add((data) => User.fromBuffer(List<int>.from(data)))
|
||||
;
|
||||
final Map<String, CodecRepo> _converters = {
|
||||
final Map<String, CodecRepo> converters = {
|
||||
MimeTypes.json: _jsonJaguarRepo,
|
||||
MimeTypes.binary: _protoJaguarRepo,
|
||||
};
|
||||
@@ -96,7 +96,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return PetApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return StoreApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
@@ -126,7 +126,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return UserApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.0.1-SNAPSHOT
|
||||
4.0.3-SNAPSHOT
|
||||
@@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke
|
||||
This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Build date: 2019-05-27T21:20:42.193+08:00[Asia/Hong_Kong]
|
||||
- Build date: 2019-06-29T11:25:59.502+12:00[Pacific/Auckland]
|
||||
- Build package: org.openapitools.codegen.languages.DartJaguarClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ final _jsonJaguarRepo = JsonRepo()
|
||||
..add(TagSerializer())
|
||||
..add(UserSerializer())
|
||||
;
|
||||
final Map<String, CodecRepo> _converters = {
|
||||
final Map<String, CodecRepo> converters = {
|
||||
MimeTypes.json: _jsonJaguarRepo,
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return PetApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return StoreApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return UserApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.0.1-SNAPSHOT
|
||||
4.0.3-SNAPSHOT
|
||||
@@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke
|
||||
This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Build date: 2019-05-27T21:20:47.082+08:00[Asia/Hong_Kong]
|
||||
- Build date: 2019-06-29T11:26:07.058+12:00[Pacific/Auckland]
|
||||
- Build package: org.openapitools.codegen.languages.DartJaguarClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true)
|
||||
..add((data) => Tag.fromBuffer(List<int>.from(data)))
|
||||
..add((data) => User.fromBuffer(List<int>.from(data)))
|
||||
;
|
||||
final Map<String, CodecRepo> _converters = {
|
||||
final Map<String, CodecRepo> converters = {
|
||||
MimeTypes.json: _jsonJaguarRepo,
|
||||
MimeTypes.binary: _protoJaguarRepo,
|
||||
};
|
||||
@@ -96,7 +96,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return PetApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return StoreApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
@@ -126,7 +126,7 @@ class JaguarApiGen {
|
||||
base = _baseRoute;
|
||||
}
|
||||
if(converters == null) {
|
||||
converters = _converters;
|
||||
converters = this.converters;
|
||||
}
|
||||
return UserApi(base: base, converters: converters, timeout: timeout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user