This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Commit aa6e36f
authored
Add kotlin generator, includes schema generation and validation (#431)
* Adds kotlin petstore sample
* Changes status to experimental
* Updates 2 configuration classes
* Converts all exceptions to kotlin
* Converts KeywordValidator and supporting classes to Kotlin
* Updates kotlin jsonschema templates and supporting classes
* Reverts java templates
* Updates AdditionalPropertiesValidator
* Updates UnsetAnyTypeJsonSchema
* Move improvemnts for kotlin code of json schema and unset anytype schema
* Updates companion object for unset any type schema
* More improvements to UnsetAnyTypeJsonSchema
* Fixes more types in UnsetAnyTypeJsonSchema1Boxed
* Updates FrozenList and FrozenMap
* Updates FrozenList/Map
* Reverts java template changes
* Fixes all of the type validator interfaces
* Updates type validator
* Updates FormatValidator
* Updates ItemsValidator
* Updates RequiredValidator
* Updates ExclusiveMaximumValidator
* Updates ExclusiveMinimumValidator
* Updates max and min items validators
* Updates Max and Min length validators
* Updates max and min properties validator
* Updates max and min validator
* Fixes some intelij warnings in the jsonschema class
* Updates AllOfValidator
* Updates anyof and oneof validators
* Updates not and unique items validators
* Updates enum + pattern validators
* Updates const and contains validator
* Updates max and min contains validators
* Updates DependentRequiredValidator + PropertyNamesValidator
* Updates DependentSchemasValidator + PatternPropertiesValidator
* Updates IfValidator + PrefixItemsValidator
* Updates ElseValidator + ThenValidator
* Updates UnevaluatedItemsValidator + UnevaluatedPropertiesValidator
* Updates AnyTypeJsonSchema
* Updates NotAnyTypeJsonSchema
* Updates BooleanJsonSchema
* Adds NullJsonSchema
* Updates StringJsonSchema
* Updates ListJsonSchema
* Updates MapJsonSchema
* Updates NumberJsonSchema
* Updates DateJsonSchema
* Updates DateTimeJsonSchema
* Updates DecimalJsonSchema
* Adds DoubleJsonSchema
* Updates FloatJsonSchema
* Updates GenericBuilder
* Uses intsAllowedForFloatDoubleFormats in Float/Double schemas
* Updates Int32JsonSchema
* Updates Int64JsonSchema
* Updates IntJsonSchema
* Updates SetMaker and UnsetAddPropsSetter
Updates UuidJsonSchema
Updates AdditionalPropertiesValidatorTest
Removes unused kotlin files in petstore
Updates the type value method interfaces and enum validators
Updates some lingering java code to kotlin
Fixes compile errors
Fixes JsonSchemaKeywordFlagsTest
Fixes JsonSchemaFactory and existing tests
FIxes CustomIsoparserTest
Updates FormatValidatorTest
Updates ItemsValidatorTest
Updates JsonSchemaTest
Updates PropertiesValidatorTest
Updates RequiredValidatorTest
Updates TypeValidatorTest
Updates AnyTypeSchemaTest
Updates ArrayTypeSchemaTest
Updates BooleanSchemaTest
Updates ListBuilderTest
Updates ListSchemaTest
Updates MapSchemaTest
Updates NullSchemaTest
Updates NumberSchemaTest
Partial updated to ObjectTypeSchemaTest kt file only
More partial updates to ObjectTypeSchemaTest kt file
Adds ObjectTypeSchemaTest
Partial update of RefBooleanSchemaTest
Updates RefBooleanSchemaTest
Stops generating api client and rest client if there are no paths in kotlin
Kotlin does not generate response sif there are not component responses or paths
Makes request body kotlin generation conditional on presence of paths or component request bodies
Conditionally generate parameters and headers packages for kotlin
303 sample regen
Conditionally generates mediatype in kotlin
Kotlin makes contenttype generation conditional
Refactors supporting file adding into one method in kotlin
Conditionally generate ApiCOnfiguration, fix artifactId warning
Conditionally generates ApiException
Makes generation of NotImplementedException conditional
Updates readme to detect no endpoints, updates readme and gradle settings to use generatorSettings
Fixes readme reference to artifactVersion
Fixes various kotlin bugs, tests now pass without generated schemas
Kotlin 303 regen, component schemas and tests deleted
Fixes object output class initialization and requiredProps and optionalProps static vars
Fixes object output class property methods
Fixes output types for kotlin
Fixes kotlin input types
Fixes of input type definitions
Removes list map and set imports
Objects import removed
Many schema generation fixes, imports property methods
Removes casts because kotlin smart casts
Many fixes for builder setter interfaces and methods
More improvements to builder setters
Fixes setters and builder classes
Fixes sealed interfaces for schemas
Updates type values
Udpates properties, moves JsonSchemaInfo higher
Partial validate fix
Adds needed schema constructors
Updates getNewInstance
Fixes broken code in validate methods
Removes PropertyEntry, more fixes
Fixes many more kotlin errors
Fixes some kotlin casting issues
Updates schema info list creation to use listOf
Updates code to use setOf
Fixes array input and output classes
Fixes schema extension of primitive json schemas
Fixes enum types
Fixes json schema enum data
Fixes defaultValue method
Fixes character escaping
Removes many unneeded semicolons
Fixes kotlin 303 tests
Kotlin 303 sample added to ci
Adds kotlin doc
Adds circleci test for kotlin
tweaks circleci file
Turns off kotlinc version printing
Checks gradle wrapper version
Updates android image
Switches image version
Changes kotlin image ot use openjdk
Removes kotlinc log
Updates wrapper invocation
Turns on test logging, forces to be rerun
* Samples and docs regen
* Kotlin 310 sample gen
* Updates dependentSchemas
* Updates dependentRequired
* Updates patternProperties
* Includes patternProperties in calculation of mapValueSchema
* Omits getKnownKeys method when additionalProperties is turned off
* Fixes value checking of lists of any type in map output getters
* Fixes output type issues for property getters
* Adds 310 kotlin test to ci
* Samples regen
* Adjusts gradlew command
* Update build file to increase the max jvm memory limit when compiling
* Removes nodaemon arg on gradle test invocation
* Adds info logging to 310 gradle test
* Adds info logging
* Increases memory to 512 mB
* Increases memory to 1 g
* Updates template default to 1g
* Readme updated1 parent 9e824ae commit aa6e36f
File tree
1,316 files changed
+224118
-153
lines changed- .circleci
- bin/generate_samples_configs
- docs/generators
- samples/client
- 3_0_3_unit_test/kotlin
- .openapi-generator
- docs
- components/schemas
- servers
- src
- main/kotlin/org/openapijsonschematools/client
- components/schemas
- configurations
- exceptions
- schemas
- validation
- servers
- test/kotlin/org/openapijsonschematools/client
- components/schemas
- configurations
- schemas
- validation
- 3_1_0_unit_test
- java
- docs/components/schemas
- src/main/java/org/openapijsonschematools/client/components/schemas
- kotlin
- .openapi-generator
- docs
- components/schemas
- servers
- src
- main/kotlin/org/openapijsonschematools/client
- components/schemas
- configurations
- exceptions
- schemas
- validation
- servers
- test/kotlin/org/openapijsonschematools/client
- components/schemas
- configurations
- schemas
- validation
- python
- docs/components/schema
- src/unit_test_api/components/schema
- src/main
- java/org/openapijsonschematools/codegen
- common
- config
- generatorrunner
- generators
- generatorloader
- resources
- java
- kotlin
- src
- main/kotlin/packagename
- apiclient
- apis
- paths
- tags
- components
- headers
- parameter
- requestbodies
- responses
- schemas
- SchemaClass
- helpers
- types
- securityschemes
- configurations
- contenttype
- exceptions
- header
- mediatype
- parameter
- paths/path
- verb
- requestbody
- response
- restclient
- schemas
- validation
- securityrequirementobjects
- securityschemes
- servers
- test/kotlin/packagename
- components/schemas
- configurations
- header
- parameter
- requestbody
- response
- schemas
- validation
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,316 files changed
+224118
-153
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 15 | + | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
140 | 155 | | |
141 | 156 | | |
142 | 157 | | |
| |||
146 | 161 | | |
147 | 162 | | |
148 | 163 | | |
| 164 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
48 | 33 | | |
49 | | - | |
| 34 | + | |
50 | 35 | | |
51 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
52 | 43 | | |
53 | | - | |
54 | 44 | | |
55 | 45 | | |
56 | | - | |
57 | | - | |
| 46 | + | |
| 47 | + | |
58 | 48 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
101 | 52 | | |
102 | 53 | | |
103 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments