This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Commit 6254a92
authored
Java, improves schema generics (#332)
* Changes JsonSchema to be parameterized on 3 generics
* Updates UnsetAnyTypeJsonSchema
* Updates AnyType and NotAnyType schemas
* Updates AnyType and NotAnyType schema imports
* Fixes JsonSchema imports
* Fixes BooleanJsonSchema
* Updates DateJsonSchema
* Updates DateTimeJsonSchema
* Updates StringJsonSchema
* Fixes UuidJsonSchema
* Updates NullJsonSchema
* Updates DecimalJsonSchema
* Updates NumberJsonSchema
* Fixes JsonSchemaTest
* Adds validate methods to AnyType
* Adds more validate methods to NumberSchema
* Updates number schema tests
* Fixes float and double validate methods
* Updates IntJsonSchema
* Updates Int32JsonSchema
* Updates Int64 and JsonSchema
* Gets validator interface working for anytypejsonschema
* Adds SchemaX validators and uses them in unsetanytypeschema
* Updates AnyType and NotAnyType schemas
* Fixes anytype and notanytype imports
* Updates BooleanJsonSchema
* Updates DateJsonSchema
* Updates DateTimejson schema
* Updates DecimalJsonSchema
* Updates StringJsonSchema
* Updates UuidJsonSchema
* Updates NullJsonSchema
* Updates NumberJsonSchema
* Updates DoubleJsonSchema
* Updates FloatJsonSchema
* Updates Int32
* Updates Int64JsonSchema
* Updates IntJsonSchema
* Updates ListJsonSchema
* Updates MapJsonSchema
* Fixes validators and not any type schema import
* Updates ArrayTypeSchemaTest
* Fixes JsonSchemaTest
* Updates ObjectTypeSchemaTest
* Fixes NullSchemaTest
* Fixes BoolSchemaTest
* Fixes RefBooleanSchemaTest
* Fixes MapSchemaTest
* Updates ListSchemaTest
* Fixes AnyTypeSchemaTest
* Fixes AdditionalPropertiesValidatorTest
* Adds ItemsValidatorTest
* Fixes PropertiesValidatorTest
* Fixes RequiredValidatorTest
* Fixes number tests
* Updates gen schema implements for one of types
* String schemas updated
* Updates FrozenMap classes to only pass in one generic
* Adds missing JsonSchemaFactory import
* Adds number schema validation, fixes class closing braces
* Fixes validate method for integer types
* Updates null schema validate
* Updates boolean validation
* Updates list validate method
* Adds castToAllowedTypesfor list schemas
* Updates list schema methods
* Adds missing imports in anytype
* Adds getNewinstance as required JsonSchema method
* Updates anytype schemas to have object getNewInstance
* Adds getNewInstance to all except list and map schema classes
* Updates array test to use the new object method getNewInstance in list getNewInstance
* Adds missing getNewInstance method to list schemas
* Adds missing methods to boolean, null, number, and string schemas
* Adds castToAllowedTypes
* Adds getNewInstance
* Adds object getNewInstance for map types
* Adds validate method for maps
* Fixes map output types input to generic
* Fixes some list casting issues
* Makes array and map bulders static classes
* Updates any type validate methods
* Adds missing override annotations
* Improves validators used in multi type
* Adds list output type for anytype schemas
* Adds map output type generic to map validator to anytype schemas
* Adds private instance for singleton in all schema classes
* Adds getInstance methods
* Has of method use getInstance
* Fix map methods in anytype schemas
* Makes constructors protected so schemas can be extended
* Removes unused import
* Removes JsonSchemaFactory usages
* Fixes some java tests
* Fixes object schema tests
* Petstore regen
* Samples regen
* Adds missing >
* Fixes multitype array interface
* Fixes multitype map generics
* Updates list schema template
* Updates number schema validate implementation
* Updates map validate implementation
* Updates list validate implementation
* Adds missing null and boolean validator imports
* Fixes removes key type from frozenmap output types
* Adds _castToAllowedTypesObject_implementor
* Writes getNewInstance in all schemas for Object input
* Fixes indentation in getNewInstance
* Adds missing imports for FrozenList and FrozenMap
* Samples regen
* Fixes cast type and java test1 parent 3d1e9a3 commit 6254a92
File tree
784 files changed
+57539
-10114
lines changed- samples/client
- 3_0_3_unit_test/java
- .openapi-generator
- src
- main/java/org/openapijsonschematools/client
- components/schemas
- schemas
- validation
- test/java/org/openapijsonschematools/client
- components/schemas
- schemas
- validation
- petstore/java
- .openapi-generator
- docs/components/schemas
- src
- main/java/org/openapijsonschematools/client
- components
- headers
- int32jsoncontenttypeheader/content/applicationjson
- numberheader
- stringheader
- parameters/pathusername
- requestbodies/userarray/content/applicationjson
- responses
- headerswithnobody
- headers/location
- successfulxmlandjsonarrayofpet/content
- applicationjson
- applicationxml
- successinlinecontentandheader
- content/applicationjson
- headers/someheader
- successwithjsonapiresponse
- schemas
- paths
- commonparamsubdir
- delete
- parameters
- parameter0
- parameter1
- get
- parameters/parameter0
- parameters/parameter0
- post
- parameters/parameter0
- fakebodywithqueryparams/put
- parameters/parameter0
- fakecasesensitiveparams/put
- parameters
- parameter0
- parameter1
- parameter2
- fakedeletecoffeeid/delete
- parameters/parameter0
- fakeinlineadditionalproperties/post/requestbody/content/applicationjson
- fakeinlinecomposition/post
- parameters
- parameter0
- parameter1
- requestbody/content
- applicationjson
- multipartformdata
- responses/response200/content
- applicationjson
- multipartformdata
- fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded
- 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
- fakequeryparamwithjsoncontenttype/get
- parameters/parameter0/content/applicationjson
- responses/response200/content/applicationjson
- fakerefobjinquery/get
- faketestqueryparamters/put
- parameters
- parameter0
- parameter1
- parameter2
- parameter3
- parameter4
- fakeuploaddownloadfile/post
- requestbody/content/applicationoctetstream
- responses/response200/content/applicationoctetstream
- fakeuploadfiles/post/requestbody/content/multipartformdata
- fakeuploadfile/post/requestbody/content/multipartformdata
- 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
- 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
- post
- parameters/parameter0
- requestbody/content/applicationxwwwformurlencoded
- storeorderorderid
- delete
- parameters/parameter0
- get
- parameters/parameter0
- userlogin/get
- parameters
- parameter0
- parameter1
- responses/response200
- content
- applicationjson
- applicationxml
- headers
- xexpiresafter
- xratelimit/content/applicationjson
- userusername
- delete
- get
- put
- schemas
- validation
- test/java/org/openapijsonschematools/client
- components/schemas
- schemas
- validation
- src/main
- java/org/openapijsonschematools/codegen/generators
- resources/java/src
- main/java/packagename
- components/schemas
- SchemaClass
- helpers
- types
- 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.
784 files changed
+57539
-10114
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
237 | 242 | | |
238 | 243 | | |
239 | 244 | | |
| |||
Lines changed: 72 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
| 8 | + | |
4 | 9 | | |
| 10 | + | |
5 | 11 | | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
10 | | - | |
11 | 17 | | |
12 | 18 | | |
13 | | - | |
14 | 19 | | |
15 | | - | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
| 23 | + | |
18 | 24 | | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
33 | | - | |
34 | | - | |
| 40 | + | |
| 41 | + | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| |||
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
43 | | - | |
| 50 | + | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
| |||
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
63 | | - | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
68 | | - | |
| 75 | + | |
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
75 | | - | |
| 82 | + | |
| 83 | + | |
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
| |||
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
85 | 100 | | |
86 | 101 | | |
87 | | - | |
88 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
89 | 129 | | |
90 | | - | |
91 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
92 | 150 | | |
93 | 151 | | |
| 152 | + | |
94 | 153 | | |
0 commit comments