This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Commit c52cb81
authored
Java, adds checker framework (#342)
* Checker framework added
* Adds missing compilerArgs for the checker framework
* Adds some needed annotations
* Adds nullable annotation to getNewInstance object input
* Adds and uses getClass method to protect against getting the class of the value null
* Adds Nullable to arg input of KeywordValidator
* Fixes type issues in JsonSchema.java
* Adds Nullable return for KeywordValidator validate
* Adds supression of seaierliazable class warnings
* Adds @nullable as the return type of shcema getNewInstance with object input
* Adds more nullable annotations
* Updates FrozenMap to fix type issues
* Fixes type issues in ListJsonschema
* Fixes MapJsonSchema
* Fixes type errors in AnyType/UnsetAnyType/NotAnyType schemas
* Fixes type issue in RequiredValidator
* Fixes type issues in RequiredValidator
* Removes getConstraint from validators
* Updates EnumValidator
* Updates UniqueItemsValidator
* Fixes EnumValidator by supressing the nullness check on set.contains
* Fixes AdditionalPropertiesValidator
* Fixes JsonSchemaFactory
* Fixes getNewInstance for custom list schemas
* Improves map schema getNewInstance
* Improves outputtypes
* Adds throws exceptions to property getters
* Adds missing exception imports
* Adds type checking protection for required and optional property getters
* Adds NonNull annotation for single outptu types
* Fixes throws signatures for getAdditionalProperty
* Removes annotations from instanceof checks
* Removes else condition from if when checking key type
* Fixes type errors around property instantiation
* Fixes list item instantiation type errors
* Changes RuntimeExceptions to InvalidTypeExceptions, fixes NullSchemaTest error
* Fixes ListSchemaTest
* Fixes NumberSchemaTest
* Fixes MapSchemaTest
* Fixes TypeValidatorTest
* Fixes JsonSchemaTest
* Fixes RequiredValidatorTest
* Fixes AnyTypeSchemaTest
* FIxes ItemsValidatorTest
* Fixes FormatValidatorTest
* Fixes AdditionalPropertiesValidatorTest
* Fixes ArrayTypeSchemaTest
* Fixes PropertiesValidatorTest
* Removes NonNull
* Adds back one needed NonNull
* Adds ObjectTypeSchemaTest
* Adds Nullable to input types
* Removes validate methods from list + map nterface and updates two tests
* All type checks passing except for SimpleEntry issue
* Removes test that has problem
* Adds singletons to refed (extended) classes
* Removes redundant casts
* Stores EnumValue schema that includes calculated item types
* Adds code to caluclate mapValuSchema for schema payload examples
* Fixes AbstractMap.SimpleEntry types
* Stops writing SimpleEntry type if there is only one entry
* Adds CodegenSchema isNullableObject, improves new instance handling in custom list and map schemas
* Better handling of nullable object in getNewInstance for map and list if schema exists
* Updates enum validator to allow long to int value checking
* Adds null checking in getNewInstance for map schemas
* Regenerates java petstore
* Fixes null detection for custom list schemas in getNewInstance
* Adds FrozenListOfAnything.java + FrozenMapOfAnything.java
* Fixes FrozenList/Map of anythint type, fixes getting of required/optional property where the type is the same as the map value
* Fixes additional property fetching when the val type is the same as what's in the map
* Removes raw types from Array/Map output type of input type
* Adds null checking in property getter for optional + req props
* Removes FrozenList/Map of anything classes
* Adds null detection when getting additional property
* Samples regen1 parent ffc45df commit c52cb81
File tree
897 files changed
+19550
-10582
lines changed- samples/client
- 3_0_3_unit_test/java
- docs/components/schemas
- src
- main/java/org/openapijsonschematools/client
- components/schemas
- exceptions
- schemas
- validation
- test/java/org/openapijsonschematools/client
- components/schemas
- schemas
- validation
- petstore/java
- docs
- components
- requestbodies/userarray/content/applicationjson
- responses/successfulxmlandjsonarrayofpet/content
- applicationjson
- applicationxml
- schemas
- paths
- fakeinlinecomposition/post
- parameters/parameter1
- requestbody/content/multipartformdata
- responses/response200/content/multipartformdata
- fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded
- fakemultiplerequestbodycontenttypes/post/requestbody/content
- applicationjson
- multipartformdata
- fakeobjinquery/get/parameters/parameter0
- fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata
- fakeuploadfiles/post/requestbody/content/multipartformdata
- fakeuploadfile/post/requestbody/content/multipartformdata
- fake
- get
- parameters/parameter4
- requestbody/content/applicationxwwwformurlencoded
- post/requestbody/content/applicationxwwwformurlencoded
- foo/get/responses/responsedefault/content/applicationjson
- petpetiduploadimage/post/requestbody/content/multipartformdata
- petpetid/post/requestbody/content/applicationxwwwformurlencoded
- src
- main/java/org/openapijsonschematools/client
- components
- headers
- int32jsoncontenttypeheader/content/applicationjson
- numberheader
- refcontentschemaheader/content/applicationjson
- refschemaheader
- stringheader
- parameters
- componentrefschemastringwithvalidation/content/applicationjson
- pathusername
- refschemastringwithvalidation
- requestbodies
- client/content/applicationjson
- pet/content
- applicationjson
- applicationxml
- userarray/content/applicationjson
- responses
- headerswithnobody
- headers/location
- successfulxmlandjsonarrayofpet/content
- applicationjson
- applicationxml
- successinlinecontentandheader
- content/applicationjson
- headers/someheader
- successwithjsonapiresponse
- content/applicationjson
- schemas
- exceptions
- paths
- anotherfakedummy/patch/responses/response200/content/applicationjson
- commonparamsubdir
- delete
- parameters
- parameter0
- parameter1
- get
- parameters/parameter0
- parameters/parameter0
- post
- parameters/parameter0
- fakeadditionalpropertieswitharrayofenums/get
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakebodywithfileschema/put/requestbody/content/applicationjson
- fakebodywithqueryparams/put
- parameters/parameter0
- requestbody/content/applicationjson
- fakecasesensitiveparams/put
- parameters
- parameter0
- parameter1
- parameter2
- fakeclassnametest/patch/responses/response200/content/applicationjson
- fakedeletecoffeeid/delete
- parameters/parameter0
- fakehealth/get/responses/response200/content/applicationjson
- fakeinlineadditionalproperties/post/requestbody/content/applicationjson
- fakeinlinecomposition/post
- parameters
- parameter0
- parameter1
- requestbody/content
- applicationjson
- multipartformdata
- responses/response200/content
- applicationjson
- multipartformdata
- fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded
- fakejsonpatch/patch/requestbody/content/applicationjsonpatchjson
- fakejsonwithcharset/post
- requestbody/content/applicationjsoncharsetutf8
- responses/response200/content/applicationjsoncharsetutf8
- fakemultiplerequestbodycontenttypes/post
- requestbody/content
- applicationjson
- multipartformdata
- responses/response200/content/applicationjson
- fakemultipleresponsebodies/get/responses
- response200/content/applicationjson
- response202/content/applicationjson
- fakemultiplesecurities/get/responses/response200/content/applicationjson
- fakeobjinquery/get
- parameters/parameter0
- fakeparametercollisions1ababselfab/post
- parameters
- parameter0
- parameter10
- parameter11
- parameter12
- parameter13
- parameter14
- parameter15
- parameter16
- parameter17
- parameter18
- parameter1
- parameter2
- parameter3
- parameter4
- parameter5
- parameter6
- parameter7
- parameter8
- parameter9
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakepetiduploadimagewithrequiredfile/post
- parameters/parameter0
- requestbody/content/multipartformdata
- responses/response200/content/applicationjson
- fakequeryparamwithjsoncontenttype/get
- parameters/parameter0/content/applicationjson
- responses/response200/content/applicationjson
- fakerefobjinquery/get
- parameters/parameter0
- fakerefsarraymodel/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakerefsarrayofenums/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakerefsboolean/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakerefscomposedoneofnumberwithvalidations/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakerefsenum/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakerefsmammal/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakerefsnumber/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakerefsobjectmodelwithrefprops/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- fakerefsstring/post
- requestbody/content/applicationjson
- responses/response200/content/applicationjson
- faketestqueryparamters/put
- parameters
- parameter0
- parameter1
- parameter2
- parameter3
- parameter4
- parameter5
- fakeuploaddownloadfile/post
- requestbody/content/applicationoctetstream
- responses/response200/content/applicationoctetstream
- fakeuploadfiles/post
- requestbody/content/multipartformdata
- responses/response200/content/applicationjson
- fakeuploadfile/post
- requestbody/content/multipartformdata
- responses/response200/content/applicationjson
- fakewildcardresponses/get/responses
- response1xx/content/applicationjson
- response200/content/applicationjson
- response2xx/content/applicationjson
- response3xx/content/applicationjson
- response4xx/content/applicationjson
- response5xx/content/applicationjson
- fake
- delete
- parameters
- parameter0
- parameter1
- parameter2
- parameter3
- parameter4
- parameter5
- get
- parameters
- parameter0
- parameter1
- parameter2
- parameter3
- parameter4
- parameter5
- requestbody/content/applicationxwwwformurlencoded
- responses/response404/content/applicationjson
- patch/responses/response200/content/applicationjson
- post/requestbody/content/applicationxwwwformurlencoded
- foo/get/responses/responsedefault/content/applicationjson
- petfindbystatus/get
- parameters/parameter0
- petfindbytags/get
- parameters/parameter0
- petpetiduploadimage/post
- parameters/parameter0
- requestbody/content/multipartformdata
- petpetid
- delete
- parameters
- parameter0
- parameter1
- get
- parameters/parameter0
- responses/response200/content
- applicationjson
- applicationxml
- post
- parameters/parameter0
- requestbody/content/applicationxwwwformurlencoded
- storeorderorderid
- delete
- parameters/parameter0
- get
- parameters/parameter0
- responses/response200/content
- applicationjson
- applicationxml
- storeorder/post
- requestbody/content/applicationjson
- responses/response200/content
- applicationjson
- applicationxml
- userlogin/get
- parameters
- parameter0
- parameter1
- responses/response200
- content
- applicationjson
- applicationxml
- headers
- xexpiresafter
- xratelimit/content/applicationjson
- userusername
- delete
- get
- responses/response200/content
- applicationjson
- applicationxml
- put
- requestbody/content/applicationjson
- user/post/requestbody/content/applicationjson
- schemas
- validation
- test/java/org/openapijsonschematools/client/schemas
- validation
- src/main
- java/org/openapijsonschematools/codegen/generators
- openapimodels
- resources/java
- src
- main/java/packagename
- components/schemas
- SchemaClass
- helpers
- types
- exceptions
- schemas
- validation
- test/java/packagename
- components/schemas
- schemas
- validation
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
897 files changed
+19550
-10582
lines changedLines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments