Skip to content

Commit

Permalink
Merge e70b182 into a5a88eb
Browse files Browse the repository at this point in the history
  • Loading branch information
AngLi2 committed Nov 15, 2019
2 parents a5a88eb + e70b182 commit 06f9332
Show file tree
Hide file tree
Showing 80 changed files with 270 additions and 195 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.junit.Assert;
import org.junit.Test;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.exc.InputCoercionException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
Expand Down Expand Up @@ -108,7 +108,7 @@ void batFastFail(Class<?> cls, Class<?> e1, Class<?> e2) {
}

void batFastFail(Class<?> cls) {
batFastFail(cls, JsonParseException.class, InvalidFormatException.class);
batFastFail(cls, InputCoercionException.class, InvalidFormatException.class);
}

void batFastFail(String fieldName, Class<?> e1, Class<?> e2) {
Expand All @@ -130,8 +130,8 @@ public void testEnum() {

@Test
public void testChar() {
batFastFail(char.class, JsonParseException.class, MismatchedInputException.class);
batFastFail(Character.class, JsonParseException.class, MismatchedInputException.class);
batFastFail(char.class, InputCoercionException.class, MismatchedInputException.class);
batFastFail(Character.class, InputCoercionException.class, MismatchedInputException.class);

batFastFail("cValue", JsonMappingException.class, MismatchedInputException.class);
batFastFail("cObjValue", JsonMappingException.class, MismatchedInputException.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public interface Test3rdPartyServiceIntf {
+ " default: 0\n"
+ " format: \"int32\"\n"
+ " responses:\n"
+ " 200:\n"
+ " \"200\":\n"
+ " description: \"response of 200\"\n"
+ " schema:\n"
+ " type: \"integer\"\n"
Expand All @@ -160,7 +160,7 @@ public interface Test3rdPartyServiceIntf {
+ " default: 0\n"
+ " format: \"int32\"\n"
+ " responses:\n"
+ " 200:\n"
+ " \"200\":\n"
+ " description: \"response of 200\"\n"
+ " schema:\n"
+ " type: \"integer\"\n"
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/test/test/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ paths:
schema:
$ref: "#/definitions/testintBody"
responses:
200:
"200":
description: "response of 200"
definitions:
testintBody:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ paths:
get:
operationId: sayHello
responses:
200:
"200":
description: say hello
schema:
type: string
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ paths:
get:
operationId: sayHello
responses:
200:
"200":
description: say hello
schema:
type: string
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ paths:
type: integer
format: int32
responses:
200:
"200":
description: add numer
schema:
type: integer
Expand All @@ -71,7 +71,7 @@ paths:
type: integer
format: int32
responses:
200:
"200":
description: reduce
schema:
type: integer
Expand All @@ -86,7 +86,7 @@ paths:
schema:
$ref: '#/definitions/Person'
responses:
200:
"200":
description: say hello
schema:
$ref: '#/definitions/Person'
Expand All @@ -100,7 +100,7 @@ paths:
x-raw-json: true
type: string
responses:
200:
"200":
description: test RawJson String
schema:
type: string
Expand All @@ -118,7 +118,7 @@ paths:
schema:
$ref: '#/definitions/Person'
responses:
200:
"200":
description: say something
schema:
type: string
Expand All @@ -131,7 +131,7 @@ paths:
required: true
type: string
responses:
200:
"200":
description: say hi
schema:
type: string
Expand All @@ -148,7 +148,7 @@ paths:
required: true
type: string
responses:
200:
"200":
description: say hi
schema:
type: string
Expand All @@ -161,15 +161,15 @@ paths:
required: true
type: string
responses:
200:
"200":
description: say hi
schema:
type: string
/istrue:
get:
operationId: isTrue
responses:
200:
"200":
description: is true
schema:
type: boolean
Expand All @@ -186,7 +186,7 @@ paths:
items:
type: string
responses:
200:
"200":
description: add string
schema:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ paths:
schema:
type: string
responses:
200:
"200":
description: asdf
schema:
type: string
Expand All @@ -64,7 +64,7 @@ paths:
schema:
type: string
responses:
200:
"200":
description: asdf
schema:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ paths:
items:
type: string
responses:
200:
"200":
description: asdf
schema:
type: string
Expand All @@ -60,7 +60,7 @@ paths:
required: false
type: string
responses:
200:
"200":
description: asdf
schema:
type: string
Expand All @@ -73,7 +73,7 @@ paths:
type: integer
format: int32
responses:
200:
"200":
description: asdf
schema:
type: string
Expand All @@ -86,7 +86,7 @@ paths:
type: integer
format: int32
responses:
200:
"200":
description: asdf
schema:
type: string
Expand All @@ -100,7 +100,7 @@ paths:
type: integer
format: int32
responses:
200:
"200":
description: asdf
schema:
type: string
Expand Down Expand Up @@ -136,7 +136,7 @@ paths:
schema:
$ref: '#/definitions/User'
responses:
200:
"200":
description: asdf
schema:
$ref: '#/definitions/User'
Expand All @@ -154,7 +154,7 @@ paths:
schema:
$ref: '#/definitions/TestRequest'
responses:
200:
"200":
description: asdf
schema:
$ref: '#/definitions/User'
Expand All @@ -173,15 +173,15 @@ paths:
items:
type: string
responses:
200:
"200":
description: add string
schema:
type: string
/testTraceId:
get:
operationId: testTraceId
responses:
200:
"200":
description: get trace id
schema:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ paths:
schema:
$ref: '#/definitions/User'
responses:
200:
"200":
description: asdf
schema:
$ref: '#/definitions/User'
Expand All @@ -67,7 +67,7 @@ paths:
schema:
$ref: '#/definitions/TestRequest'
responses:
200:
"200":
description: asdf
schema:
$ref: '#/definitions/User'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ paths:
type: integer
format: int32
responses:
200:
"200":
description: add numer
schema:
type: integer
Expand All @@ -66,7 +66,7 @@ paths:
required: true
type: string
responses:
200:
"200":
description: say hello
schema:
type: string
Expand All @@ -84,7 +84,7 @@ paths:
schema:
$ref: '#/definitions/Person'
responses:
200:
"200":
description: say something
schema:
type: string
Expand All @@ -97,7 +97,7 @@ paths:
required: true
type: string
responses:
200:
"200":
description: say hi
schema:
type: string
Expand All @@ -110,7 +110,7 @@ paths:
required: true
type: string
responses:
200:
"200":
description: say hei
schema:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ paths:
schema:
type: string
responses:
200:
"200":
description: asdf
schema:
type: string
Expand All @@ -64,7 +64,7 @@ paths:
schema:
type: string
responses:
200:
"200":
description: asdf
schema:
type: string
Expand Down
Loading

0 comments on commit 06f9332

Please sign in to comment.