forked from loafle/openapi-generator-original
Merge pull request #3003 from Cosium/feign-disable-fail_on_unknwon_properties
Feign: disable FAIL_ON_UNKNOWN_PROPERTIES by default
This commit is contained in:
commit
43fe3fa6d0
@ -22,7 +22,7 @@ import {{invokerPackage}}.auth.OAuth.AccessTokenListener;
|
||||
public class ApiClient {
|
||||
public interface Api {}
|
||||
|
||||
private ObjectMapper objectMapper;
|
||||
protected ObjectMapper objectMapper;
|
||||
private String basePath = "{{basePath}}";
|
||||
private Map<String, RequestInterceptor> apiAuthorizations;
|
||||
private Feign.Builder feignBuilder;
|
||||
@ -128,6 +128,11 @@ public class ApiClient {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
public ObjectMapper getObjectMapper(){
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
|
@ -174,3 +174,28 @@
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
@ -14,7 +14,7 @@ import feign.codec.EncodeException;
|
||||
import feign.codec.Encoder;
|
||||
import feign.RequestTemplate;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class FormAwareEncoder implements Encoder {
|
||||
public static final String UTF_8 = "utf-8";
|
||||
private static final String LINE_FEED = "\r\n";
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
|
@ -11,7 +11,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import feign.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public interface FakeApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import feign.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public interface PetApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import feign.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public interface StoreApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import feign.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public interface UserApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ import java.util.Map;
|
||||
/**
|
||||
* AdditionalPropertiesClass
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class AdditionalPropertiesClass {
|
||||
|
||||
private Map<String, String> mapProperty = new HashMap<String, String>();
|
||||
|
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* Animal
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Animal {
|
||||
|
||||
private String className = null;
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* AnimalFarm
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class AnimalFarm extends ArrayList<Animal> {
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* ArrayTest
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class ArrayTest {
|
||||
|
||||
private List<String> arrayOfString = new ArrayList<String>();
|
||||
|
@ -11,7 +11,7 @@ import io.swagger.client.model.Animal;
|
||||
/**
|
||||
* Cat
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Cat extends Animal {
|
||||
|
||||
private String className = null;
|
||||
|
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* Category
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Category {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -11,7 +11,7 @@ import io.swagger.client.model.Animal;
|
||||
/**
|
||||
* Dog
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Dog extends Animal {
|
||||
|
||||
private String className = null;
|
||||
|
@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* EnumTest
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class EnumTest {
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@ import java.util.Date;
|
||||
/**
|
||||
* FormatTest
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class FormatTest {
|
||||
|
||||
private Integer integer = null;
|
||||
|
@ -15,7 +15,7 @@ import java.util.Map;
|
||||
/**
|
||||
* MixedPropertiesAndAdditionalPropertiesClass
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
private String uuid = null;
|
||||
|
@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
* Model for testing model name starting with number
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model name starting with number")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Model200Response {
|
||||
|
||||
private Integer name = null;
|
||||
|
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* ModelApiResponse
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class ModelApiResponse {
|
||||
|
||||
private Integer code = null;
|
||||
|
@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
* Model for testing reserved words
|
||||
*/
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class ModelReturn {
|
||||
|
||||
private Integer _return = null;
|
||||
|
@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
* Model for testing model name same as property name
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model name same as property name")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Name {
|
||||
|
||||
private Integer name = null;
|
||||
|
@ -12,7 +12,7 @@ import java.util.Date;
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Order {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||
/**
|
||||
* Pet
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Pet {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* ReadOnlyFirst
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class ReadOnlyFirst {
|
||||
|
||||
private String bar = null;
|
||||
|
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* SpecialModelName
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class SpecialModelName {
|
||||
|
||||
private Long specialPropertyName = null;
|
||||
|
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* Tag
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class Tag {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-31T18:50:49.249+02:00")
|
||||
public class User {
|
||||
|
||||
private Long id = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user