File tree Expand file tree Collapse file tree 6 files changed +36
-10
lines changed
swagger-core/src/test/java/io/swagger/v3/core/resolving/v31
java/io/swagger/v3/jaxrs2 Expand file tree Collapse file tree 6 files changed +36
-10
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ public void testOAS31Fields() {
131131 " type: number\n " +
132132 " status:\n " +
133133 " type:\n " +
134+ " - object\n " +
134135 " - string\n " +
135136 " - number\n " +
136137 " intValue:\n " +
@@ -160,7 +161,8 @@ public void testOAS31Fields() {
160161 " creditCard:\n " +
161162 " $ref: \" #/components/schemas/CreditCard\" \n " +
162163 " properties:\n " +
163- " extraObject: {}\n " +
164+ " extraObject: \n " +
165+ " type: object\n " +
164166 "MultipleBaseBean:\n " +
165167 " type: object\n " +
166168 " description: MultipleBaseBean\n " +
Original file line number Diff line number Diff line change @@ -3569,6 +3569,7 @@ public void testOas31Petstore() {
35693569 " name:\n " +
35703570 " type: string\n " +
35713571 " annotated:\n " +
3572+ " type: object\n " +
35723573 " $ref: \" #/components/schemas/Category\" \n " +
35733574 " description: child description\n " +
35743575 " properties:\n " +
@@ -3623,6 +3624,7 @@ public void test31RefSiblings() {
36233624 " type: object\n " +
36243625 " properties:\n " +
36253626 " annotated:\n " +
3627+ " type: \" object\" \n " +
36263628 " $ref: \" #/components/schemas/SimpleCategory\" \n " +
36273629 " description: child description\n " +
36283630 " properties:\n " +
@@ -4006,6 +4008,7 @@ public void testMisc31() {
40064008 " type: number\n " +
40074009 " status:\n " +
40084010 " type:\n " +
4011+ " - object\n " +
40094012 " - string\n " +
40104013 " - number\n " +
40114014 " intValue:\n " +
@@ -4085,6 +4088,7 @@ public void testMisc31() {
40854088 " type: object\n " +
40864089 " properties:\n " +
40874090 " country:\n " +
4091+ " type: object\n " +
40884092 " const: United States\n " +
40894093 " CreditCard:\n " +
40904094 " type: object\n " +
@@ -4095,11 +4099,13 @@ public void testMisc31() {
40954099 " type: object\n " +
40964100 " properties:\n " +
40974101 " postalCode:\n " +
4102+ " type: object\n " +
40984103 " pattern: \" [0-9]{5}(-[0-9]{4})?\" \n " +
40994104 " PostalCodePattern:\n " +
41004105 " type: object\n " +
41014106 " properties:\n " +
41024107 " postalCode:\n " +
4108+ " type: object\n " +
41034109 " pattern: \" [A-Z][0-9][A-Z] [0-9][A-Z][0-9]\" \n " +
41044110 " PropertyNamesPattern:\n " +
41054111 " pattern: \" ^[A-Za-z_][A-Za-z0-9_]*$\" \n " ;
Original file line number Diff line number Diff line change @@ -24,9 +24,13 @@ webhooks:
2424 $comment : random comment
2525 $id : http://yourdomain.com/schemas/myschema.json
2626 dependentSchemas :
27- pet : {}
27+ pet : {
28+ type : object
29+ }
2830 patternProperties :
29- user : {}
31+ user : {
32+ type : object
33+ }
3034 webhook1 :
3135 post :
3236 description : " subscribes a client to updates relevant to the requestor's account,\
Original file line number Diff line number Diff line change @@ -32,9 +32,13 @@ paths:
3232 $comment : random comment
3333 $id : http://yourdomain.com/schemas/myschema.json
3434 dependentSchemas :
35- pet : { }
35+ pet : {
36+ type : object
37+ }
3638 patternProperties :
37- user : { }
39+ user : {
40+ type : object
41+ }
3842 testCallback2 :
3943 http://www.url2.com :
4044 get :
Original file line number Diff line number Diff line change 9696 user :
9797 $ref : " #/components/schemas/User"
9898 properties :
99- extraObject : {}
99+ extraObject : {
100+ type : object
101+ }
100102components :
101103 schemas :
102104 Category :
Original file line number Diff line number Diff line change @@ -40,16 +40,24 @@ paths:
4040 - string
4141 - number
4242 - object
43- if : {}
44- then : {}
45- else : {}
43+ if : {
44+ type : object
45+ }
46+ then : {
47+ type : object
48+ }
49+ else : {
50+ type : object
51+ }
4652 $anchor : parameter $anchor
4753 $schema : parameter $schema
4854 description : User description
4955 example : User Description
5056 exclusiveMaximum : 100
5157 exclusiveMinimum : 1
52- unevaluatedProperties : {}
58+ unevaluatedProperties : {
59+ type : object
60+ }
5361 required : true
5462 responses :
5563 default :
You can’t perform that action at this time.
0 commit comments