Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
d11490f
Adds kotlin petstore sample
spacether May 2, 2024
8f0c9bc
Changes status to experimental
spacether May 2, 2024
028c529
Updates 2 configuration classes
spacether May 6, 2024
8efbe19
Converts all exceptions to kotlin
spacether May 6, 2024
fd1b0dd
Converts KeywordValidator and supporting classes to Kotlin
spacether May 6, 2024
b930d58
Updates kotlin jsonschema templates and supporting classes
spacether May 6, 2024
c5513c4
Reverts java templates
spacether May 6, 2024
63724fa
Updates AdditionalPropertiesValidator
spacether May 6, 2024
98f6257
Updates UnsetAnyTypeJsonSchema
spacether May 7, 2024
60a42f3
Move improvemnts for kotlin code of json schema and unset anytype schema
spacether May 7, 2024
7ca254d
Updates companion object for unset any type schema
spacether May 7, 2024
3d50a91
More improvements to UnsetAnyTypeJsonSchema
spacether May 7, 2024
c912298
Fixes more types in UnsetAnyTypeJsonSchema1Boxed
spacether May 7, 2024
8e2371f
Updates FrozenList and FrozenMap
spacether May 7, 2024
7a4b722
Updates FrozenList/Map
spacether May 7, 2024
2a472c3
Reverts java template changes
spacether May 7, 2024
585f865
Fixes all of the type validator interfaces
spacether May 7, 2024
fb9dc33
Updates type validator
spacether May 7, 2024
8f3e822
Updates FormatValidator
spacether May 7, 2024
bd8bed4
Updates ItemsValidator
spacether May 8, 2024
05a77b9
Updates RequiredValidator
spacether May 8, 2024
a6a1f1b
Updates ExclusiveMaximumValidator
spacether May 8, 2024
8d2f0b2
Updates ExclusiveMinimumValidator
spacether May 8, 2024
447f1b0
Updates max and min items validators
spacether May 8, 2024
4f1703a
Updates Max and Min length validators
spacether May 8, 2024
11bd256
Updates max and min properties validator
spacether May 8, 2024
6051806
Updates max and min validator
spacether May 8, 2024
7d0d2f2
Fixes some intelij warnings in the jsonschema class
spacether May 8, 2024
d0ac93c
Updates AllOfValidator
spacether May 8, 2024
646db81
Updates anyof and oneof validators
spacether May 8, 2024
f9addbf
Updates not and unique items validators
spacether May 8, 2024
006774b
Updates enum + pattern validators
spacether May 8, 2024
1f7652b
Updates const and contains validator
spacether May 8, 2024
e7b057a
Updates max and min contains validators
spacether May 8, 2024
cd1ac1d
Updates DependentRequiredValidator + PropertyNamesValidator
spacether May 8, 2024
20f5613
Updates DependentSchemasValidator + PatternPropertiesValidator
spacether May 8, 2024
ae18ab2
Updates IfValidator + PrefixItemsValidator
spacether May 8, 2024
643da09
Updates ElseValidator + ThenValidator
spacether May 8, 2024
e21dd34
Updates UnevaluatedItemsValidator + UnevaluatedPropertiesValidator
spacether May 8, 2024
5521ebe
Updates AnyTypeJsonSchema
spacether May 9, 2024
f887577
Updates NotAnyTypeJsonSchema
spacether May 9, 2024
4efe364
Updates BooleanJsonSchema
spacether May 9, 2024
798b77a
Adds NullJsonSchema
spacether May 9, 2024
036ecc9
Updates StringJsonSchema
spacether May 9, 2024
2c451ae
Updates ListJsonSchema
spacether May 9, 2024
ad7cd07
Updates MapJsonSchema
spacether May 9, 2024
3106125
Updates NumberJsonSchema
spacether May 9, 2024
e05b170
Updates DateJsonSchema
spacether May 9, 2024
5eeae6a
Updates DateTimeJsonSchema
spacether May 9, 2024
b1f7250
Updates DecimalJsonSchema
spacether May 9, 2024
bd787ab
Adds DoubleJsonSchema
spacether May 9, 2024
c4abd5e
Updates FloatJsonSchema
spacether May 9, 2024
2ef5e38
Updates GenericBuilder
spacether May 9, 2024
f331bf8
Uses intsAllowedForFloatDoubleFormats in Float/Double schemas
spacether May 9, 2024
3be6a1e
Updates Int32JsonSchema
spacether May 9, 2024
b71e163
Updates Int64JsonSchema
spacether May 9, 2024
9313454
Updates IntJsonSchema
spacether May 9, 2024
4bc351b
Updates SetMaker and UnsetAddPropsSetter
spacether May 9, 2024
bea0ee4
Samples and docs regen
spacether May 17, 2024
458928f
Kotlin 310 sample gen
spacether May 17, 2024
d25216e
Updates dependentSchemas
spacether May 17, 2024
22cd355
Updates dependentRequired
spacether May 17, 2024
1e24856
Updates patternProperties
spacether May 17, 2024
369a9af
Includes patternProperties in calculation of mapValueSchema
spacether May 17, 2024
79bf237
Omits getKnownKeys method when additionalProperties is turned off
spacether May 17, 2024
2ee8809
Fixes value checking of lists of any type in map output getters
spacether May 18, 2024
fbc196b
Fixes output type issues for property getters
spacether May 18, 2024
10e154b
Adds 310 kotlin test to ci
spacether May 19, 2024
651d229
Samples regen
spacether May 19, 2024
731a238
Adjusts gradlew command
spacether May 19, 2024
2fa9be6
Update build file to increase the max jvm memory limit when compiling
spacether May 20, 2024
ec334a6
Removes nodaemon arg on gradle test invocation
spacether May 20, 2024
d56bb22
Adds info logging to 310 gradle test
spacether May 20, 2024
f5ff4d8
Adds info logging
spacether May 20, 2024
b832b95
Increases memory to 512 mB
spacether May 20, 2024
dfc5f47
Increases memory to 1 g
spacether May 20, 2024
e4a788d
Updates template default to 1g
spacether May 20, 2024
9ab973e
Readme updated
spacether May 20, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Samples regen
  • Loading branch information
spacether committed May 19, 2024
commit 651d229a6bfd19e591eb614802c4906c0aa9d4be
2 changes: 1 addition & 1 deletion .circleci/testJava17ClientSamples.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(cd samples/client/petstore/java && gradle wrapper && gradle test)
(cd samples/client/petstore/java && gradle wrapper && gradlew test --no-daemon)
(cd samples/client/3_0_3_unit_test/java && mvn test)
(cd samples/client/3_1_0_unit_test/java && mvn test)
4 changes: 2 additions & 2 deletions .circleci/testKotlinClientSamples.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
(cd samples/client/3_0_3_unit_test/kotlin && gradle wrapper && ./gradlew cleanTest test)
(cd samples/client/3_1_0_unit_test/kotlin && gradle wrapper && ./gradlew cleanTest test)
(cd samples/client/3_0_3_unit_test/kotlin && gradle wrapper && ./gradlew cleanTest test --no-daemon)
(cd samples/client/3_1_0_unit_test/kotlin && gradle wrapper && ./gradlew cleanTest test --no-daemon)
1 change: 1 addition & 0 deletions docs/generators/kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>tailrec</li>
<li>this</li>
<li>throw</li>
<li>tostring</li>
<li>true</li>
<li>try</li>
<li>typealias</li>
Expand Down
8 changes: 4 additions & 4 deletions samples/client/3_0_3_unit_test/kotlin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Here is the mapping from json schema types to Kotlin types:
| object | FrozenMap (Map) |
| array | FrozenList (List) |
| string | String |
| number | Number (int, long, float, double) |
| integer | int, long, float, double (with values equal to integers) |
| boolean | boolean |
| number | Number (Int, Long, Float, Double) |
| integer | Int, Long, Float, Double (with values equal to integers) |
| boolean | Boolean |
| null | Nothing? (null) |
| AnyType (unset) | Object? |
| AnyType (unset) | Any? |

### Storage of Json Schema Definition in Kotlin JsonSchema Classes
In openapi v3.0.3 there are ~ 28 json schema keywords. Almost all of them can apply if
Expand Down
2 changes: 1 addition & 1 deletion samples/client/3_0_3_unit_test/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ tasks.wrapper {
tasks.test {
useJUnitPlatform()
testLogging {
events( "started", "passed", "skipped", "failed")
events("passed", "skipped", "failed")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class RefInAdditionalproperties {
}
val propertySchema: JsonSchema<*> = schemas.entries.iterator().next().key
val propertyInstance: Any? = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas)
if (!(propertyInstance is Any)) {
if (!(propertyInstance is Any?)) {
throw RuntimeException("Invalid instantiated value")
}
properties[entryKey] = propertyInstance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class RefInItems {
}
val itemSchema: JsonSchema<*> = schemas.entries.iterator().next().key
val itemInstance: Any? = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas)
if (!(itemInstance is Any)) {
if (!(itemInstance is Any?)) {
throw RuntimeException("Invalid instantiated value")
}
items.add(itemInstance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class RefInProperty {
val key = "a"
throwIfKeyNotPresent(key)
val value: Any? = get(key)
if (!(value is Any)) {
if (!(value is Any?)) {
throw RuntimeException("Invalid value stored for a")
}
return value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ A class that builds the Map input type

## NonAsciiPatternWithAdditionalpropertiesMap
public static class NonAsciiPatternWithAdditionalpropertiesMap<br>
extends FrozenMap<String, Object>
extends FrozenMap<String, @Nullable Object>

A class to store validated Map payloads

### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [NonAsciiPatternWithAdditionalpropertiesMap](#nonasciipatternwithadditionalpropertiesmap) | of([Map<String, Object>](#nonasciipatternwithadditionalpropertiesmapbuilder) arg, SchemaConfiguration configuration) |
| static [NonAsciiPatternWithAdditionalpropertiesMap](#nonasciipatternwithadditionalpropertiesmap) | of([Map<String, ? extends @Nullable Object>](#nonasciipatternwithadditionalpropertiesmapbuilder) arg, SchemaConfiguration configuration) |

## CircumflexAccentLatinSmallLetterAWithAcuteBoxed
public sealed interface CircumflexAccentLatinSmallLetterAWithAcuteBoxed<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternprop

## PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder
public class PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder<br>
builder for `Map<String, Object>`
builder for `Map<String, @Nullable Object>`

A class that builds the Map input type

Expand All @@ -122,7 +122,7 @@ A class that builds the Map input type
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| Map<String, Object> | build()<br>Returns map input that should be used with Schema.validate |
| Map<String, @Nullable Object> | build()<br>Returns map input that should be used with Schema.validate |
| [PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder](#propertiespatternpropertiesadditionalpropertiesinteractionmapbuilder) | foo(List<@Nullable Object> value) |
| [PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder](#propertiespatternpropertiesadditionalpropertiesinteractionmapbuilder) | bar(List<@Nullable Object> value) |
| [PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder](#propertiespatternpropertiesadditionalpropertiesinteractionmapbuilder) | additionalProperty(String key, int value) |
Expand All @@ -132,14 +132,14 @@ A class that builds the Map input type

## PropertiesPatternpropertiesAdditionalpropertiesInteractionMap
public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMap<br>
extends FrozenMap<String, Object>
extends FrozenMap<String, @Nullable Object>

A class to store validated Map payloads

### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [PropertiesPatternpropertiesAdditionalpropertiesInteractionMap](#propertiespatternpropertiesadditionalpropertiesinteractionmap) | of([Map<String, Object>](#propertiespatternpropertiesadditionalpropertiesinteractionmapbuilder) arg, SchemaConfiguration configuration) |
| static [PropertiesPatternpropertiesAdditionalpropertiesInteractionMap](#propertiespatternpropertiesadditionalpropertiesinteractionmap) | of([Map<String, ? extends @Nullable Object>](#propertiespatternpropertiesadditionalpropertiesinteractionmapbuilder) arg, SchemaConfiguration configuration) |
| FrozenList<?> | foo()<br>[optional] |
| FrozenList<?> | bar()<br>[optional] |
| Number | getAdditionalProperty(String name)<br>provides type safety for additional properties |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected NonAsciiPatternWithAdditionalpropertiesMap(FrozenMap<@Nullable Object>
public static final Set<String> requiredKeys = Set.of();
public static final Set<String> optionalKeys = Set.of();
// map with no key value pairs
public static NonAsciiPatternWithAdditionalpropertiesMap of(Map<String, @Nullable Object> arg, SchemaConfiguration configuration) throws ValidationException {
public static NonAsciiPatternWithAdditionalpropertiesMap of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration) throws ValidationException {
return NonAsciiPatternWithAdditionalproperties1.getInstance().validate(arg, configuration);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,23 +435,23 @@ public static Bar getInstance() {
}


public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMap extends FrozenMap<Object> {
protected PropertiesPatternpropertiesAdditionalpropertiesInteractionMap(FrozenMap<Object> m) {
public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMap extends FrozenMap<@Nullable Object> {
protected PropertiesPatternpropertiesAdditionalpropertiesInteractionMap(FrozenMap<@Nullable Object> m) {
super(m);
}
public static final Set<String> requiredKeys = Set.of();
public static final Set<String> optionalKeys = Set.of(
"foo",
"bar"
);
public static PropertiesPatternpropertiesAdditionalpropertiesInteractionMap of(Map<String, Object> arg, SchemaConfiguration configuration) throws ValidationException {
public static PropertiesPatternpropertiesAdditionalpropertiesInteractionMap of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration) throws ValidationException {
return PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance().validate(arg, configuration);
}

public FrozenList<?> foo() throws UnsetPropertyException {
String key = "foo";
throwIfKeyNotPresent(key);
Object value = get(key);
@Nullable Object value = get(key);
if (!(value instanceof FrozenList<?>)) {
throw new RuntimeException("Invalid value stored for foo");
}
Expand All @@ -461,7 +461,7 @@ public FrozenList<?> foo() throws UnsetPropertyException {
public FrozenList<?> bar() throws UnsetPropertyException {
String key = "bar";
throwIfKeyNotPresent(key);
Object value = get(key);
@Nullable Object value = get(key);
if (!(value instanceof FrozenList<?>)) {
throw new RuntimeException("Invalid value stored for bar");
}
Expand All @@ -479,8 +479,8 @@ public Number getAdditionalProperty(String name) throws UnsetPropertyException,
}

public interface SetterForFoo <T> {
Map<String, Object> getInstance();
T getBuilderAfterFoo(Map<String, Object> instance);
Map<String, @Nullable Object> getInstance();
T getBuilderAfterFoo(Map<String, @Nullable Object> instance);

default T foo(List<@Nullable Object> value) {
var instance = getInstance();
Expand All @@ -490,8 +490,8 @@ default T foo(List<@Nullable Object> value) {
}

public interface SetterForBar <T> {
Map<String, Object> getInstance();
T getBuilderAfterBar(Map<String, Object> instance);
Map<String, @Nullable Object> getInstance();
T getBuilderAfterBar(Map<String, @Nullable Object> instance);

default T bar(List<@Nullable Object> value) {
var instance = getInstance();
Expand All @@ -502,8 +502,8 @@ default T bar(List<@Nullable Object> value) {

public interface SetterForAdditionalProperties<T> {
Set<String> getKnownKeys();
Map<String, Object> getInstance();
T getBuilderAfterAdditionalProperty(Map<String, Object> instance);
Map<String, @Nullable Object> getInstance();
T getBuilderAfterAdditionalProperty(Map<String, @Nullable Object> instance);

default T additionalProperty(String key, int value) throws InvalidAdditionalPropertyException {
MapUtils.throwIfKeyKnown(key, getKnownKeys(), true);
Expand Down Expand Up @@ -534,8 +534,8 @@ default T additionalProperty(String key, double value) throws InvalidAdditionalP
}
}

public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder implements GenericBuilder<Map<String, Object>>, SetterForFoo<PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder>, SetterForBar<PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder>, SetterForAdditionalProperties<PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder> {
private final Map<String, Object> instance;
public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder implements GenericBuilder<Map<String, @Nullable Object>>, SetterForFoo<PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder>, SetterForBar<PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder>, SetterForAdditionalProperties<PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder> {
private final Map<String, @Nullable Object> instance;
private static final Set<String> knownKeys = Set.of(
"foo",
"bar"
Expand All @@ -546,19 +546,19 @@ public Set<String> getKnownKeys() {
public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder() {
this.instance = new LinkedHashMap<>();
}
public Map<String, Object> build() {
public Map<String, @Nullable Object> build() {
return instance;
}
public Map<String, Object> getInstance() {
public Map<String, @Nullable Object> getInstance() {
return instance;
}
public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterFoo(Map<String, Object> instance) {
public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterFoo(Map<String, @Nullable Object> instance) {
return this;
}
public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterBar(Map<String, Object> instance) {
public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterBar(Map<String, @Nullable Object> instance) {
return this;
}
public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterAdditionalProperty(Map<String, Object> instance) {
public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterAdditionalProperty(Map<String, @Nullable Object> instance) {
return this;
}
}
Expand Down Expand Up @@ -607,7 +607,7 @@ public static PropertiesPatternpropertiesAdditionalpropertiesInteraction1 getIns
}

public PropertiesPatternpropertiesAdditionalpropertiesInteractionMap getNewInstance(Map<?, ?> arg, List<Object> pathToItem, PathToSchemasMap pathToSchemas) {
LinkedHashMap<String, Object> properties = new LinkedHashMap<>();
LinkedHashMap<String, @Nullable Object> properties = new LinkedHashMap<>();
for(Map.Entry<?, ?> entry: arg.entrySet()) {
@Nullable Object entryKey = entry.getKey();
if (!(entryKey instanceof String)) {
Expand All @@ -623,12 +623,9 @@ public PropertiesPatternpropertiesAdditionalpropertiesInteractionMap getNewInsta
}
JsonSchema<?> propertySchema = schemas.entrySet().iterator().next().getKey();
@Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas);
if (!(propertyInstance instanceof Object)) {
throw new RuntimeException("Invalid instantiated value");
}
properties.put(propertyName, (Object) propertyInstance);
properties.put(propertyName, propertyInstance);
}
FrozenMap<Object> castProperties = new FrozenMap<>(properties);
FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties);
return new PropertiesPatternpropertiesAdditionalpropertiesInteractionMap(castProperties);
}

Expand Down
8 changes: 4 additions & 4 deletions samples/client/3_1_0_unit_test/kotlin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Here is the mapping from json schema types to Kotlin types:
| object | FrozenMap (Map) |
| array | FrozenList (List) |
| string | String |
| number | Number (int, long, float, double) |
| integer | int, long, float, double (with values equal to integers) |
| boolean | boolean |
| number | Number (Int, Long, Float, Double) |
| integer | Int, Long, Float, Double (with values equal to integers) |
| boolean | Boolean |
| null | Nothing? (null) |
| AnyType (unset) | Object? |
| AnyType (unset) | Any? |

### Storage of Json Schema Definition in Kotlin JsonSchema Classes
In openapi v3.0.3 there are ~ 28 json schema keywords. Almost all of them can apply if
Expand Down
2 changes: 1 addition & 1 deletion samples/client/3_1_0_unit_test/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ tasks.wrapper {
tasks.test {
useJUnitPlatform()
testLogging {
events( "started", "passed", "skipped", "failed")
events("passed", "skipped", "failed")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Key | Type | Description | Notes
## NonAsciiPatternWithAdditionalpropertiesDict
```
base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]

```
### &lowbar;&lowbar;new&lowbar;&lowbar; method
Keyword Argument | Type | Description | Notes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ Key | Type | Description | Notes

## PropertiesPatternpropertiesAdditionalpropertiesInteractionDict
```
base class: schemas.immutabledict[str, typing.Union[
typing.Tuple[schemas.OUTPUT_BASE_TYPES],
int,
]]
base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]

```
### &lowbar;&lowbar;new&lowbar;&lowbar; method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


class NonAsciiPatternWithAdditionalpropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]):

__required_keys__: typing.FrozenSet[str] = frozenset({
})
__optional_keys__: typing.FrozenSet[str] = frozenset({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ def validate(
)


class PropertiesPatternpropertiesAdditionalpropertiesInteractionDict(schemas.immutabledict[str, typing.Union[
typing.Tuple[schemas.OUTPUT_BASE_TYPES],
int,
]]):
class PropertiesPatternpropertiesAdditionalpropertiesInteractionDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]):

__required_keys__: typing.FrozenSet[str] = frozenset({
})
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/kotlin/README.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ Here is the mapping from json schema types to Kotlin types:
| object | FrozenMap (Map) |
| array | FrozenList (List) |
| string | String |
| number | Number (int, long, float, double) |
| integer | int, long, float, double (with values equal to integers) |
| boolean | boolean |
| number | Number (Int, Long, Float, Double) |
| integer | Int, Long, Float, Double (with values equal to integers) |
| boolean | Boolean |
| null | Nothing? (null) |
| AnyType (unset) | Object? |
| AnyType (unset) | Any? |

### Storage of Json Schema Definition in Kotlin JsonSchema Classes
In openapi v3.0.3 there are ~ 28 json schema keywords. Almost all of them can apply if
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/kotlin/build.gradle.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ tasks.wrapper {
tasks.test {
useJUnitPlatform()
testLogging {
events( "started", "passed", "skipped", "failed")
events("passed", "skipped", "failed")
}
}