Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Java: adds sealed boxed classes for validated Schema payloads #389

Merged
merged 48 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c6d357b
Adds request body templates
spacether Feb 7, 2024
8a7ed6d
Adds validateToBoxed to AnyTypeSchema
spacether Feb 8, 2024
62731e2
Removes unused imports
spacether Feb 8, 2024
2a155eb
Adds selaed class for string schemas
spacether Feb 8, 2024
6fbd46c
Adds boxed number classes
spacether Feb 8, 2024
d89b3d3
Adds null boxed class
spacether Feb 8, 2024
103e0d4
Adds boolean boxed classes
spacether Feb 8, 2024
06bfec7
Produces boxed list class
spacether Feb 8, 2024
b7ac3e2
Adds map sealed classes
spacether Feb 8, 2024
39fb0ff
Adds validateAndBox for anytype schemas
spacether Feb 8, 2024
aefb161
Adds validateAndBox methods to all generated classes
spacether Feb 8, 2024
54b7e62
Adds validateAndBox methods to the validator interfaces
spacether Feb 8, 2024
a09e074
Updates NotAnyTypeJsonSchema
spacether Feb 8, 2024
85eff1d
Updates BooleanJsonSchema
spacether Feb 8, 2024
84febf9
Updates NullJsonSchema
spacether Feb 8, 2024
ad60176
Updates StringJsonSchema
spacether Feb 8, 2024
2cfdca5
Updates NumberJsonSchema
spacether Feb 8, 2024
0f2f253
Updates IntJsonSchema
spacether Feb 8, 2024
74d409e
Updates UuidJsonSchema
spacether Feb 8, 2024
1703b7a
Updates DecimalJsonSchema
spacether Feb 8, 2024
de10da1
Updates DateJsonSchema
spacether Feb 9, 2024
7ed34ce
Updates DateTimeJsonSchema
spacether Feb 9, 2024
6a3e7e1
Updates ListJsonSchema
spacether Feb 9, 2024
37da5bf
Updates MapJsonSchema
spacether Feb 9, 2024
a76bcd0
Updates UnsetAnyTypeJsonSchema
spacether Feb 9, 2024
f7bdf12
Uppdates DoubleJsonSchema
spacether Feb 9, 2024
515dd11
Updates FloatJsonSchema
spacether Feb 9, 2024
1befb1f
Updates Int32JsonSchema
spacether Feb 9, 2024
020b50b
Updates Int64JsonSchema
spacether Feb 9, 2024
9d019f9
Fixes java tests
spacether Feb 9, 2024
85bf105
Updates schema doc summary about what classes there are
spacether Feb 9, 2024
4edce2c
Adds sealed class section to schema doc
spacether Feb 9, 2024
3b10410
Adds schema doc for sealed class
spacether Feb 10, 2024
54bfaa8
Adds a sentence describing the sealed class in its detailed section
spacether Feb 10, 2024
9228931
Fixes readme typos
spacether Feb 10, 2024
599c70c
Adds boxed void class description in schema docs
spacether Feb 10, 2024
9d092e3
Adds boolean boxed class section
spacether Feb 10, 2024
525574c
Adds bodex string class section to schema docs
spacether Feb 10, 2024
3589bfb
Adds boxed number classes to schema docs
spacether Feb 10, 2024
5d63d24
Adds boxed list class info to schema docs
spacether Feb 10, 2024
a8d06c5
Adds boxed map classes
spacether Feb 10, 2024
e92192f
Adds links to boxed classes in schema docs
spacether Feb 10, 2024
68c2857
Fixes schema doc links for sealed classes with no types
spacether Feb 10, 2024
5e3d191
Adds validateAndBox schema doc methods when types are unset for 4 types
spacether Feb 10, 2024
f3e4f94
Adds validateAndMap methods to schema docs
spacether Feb 10, 2024
6bbfd2f
Updates schema docs to include validateAndBox methods
spacether Feb 10, 2024
00cbdca
More schema doc tweaks
spacether Feb 10, 2024
19fc1b8
Samples regen
spacether Feb 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,46 @@ public class AdditionalpropertiesCanExistByItself

A class that contains necessary nested
- schema classes (which validate payloads), extends JsonSchema
- abstract sealed classes which store validated payloads, java version of a sum type
- boxed classes which store validated payloads, sealed permits class implementations
- classes to store validated map payloads, extends FrozenMap
- classes to build inputs for map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1Boxed](#additionalpropertiescanexistbyitself1boxed)<br> abstract sealed validated payload class |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1BoxedMap](#additionalpropertiescanexistbyitself1boxedmap)<br> boxed class to store validated Map payloads |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1](#additionalpropertiescanexistbyitself1)<br> schema class |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMapBuilder](#additionalpropertiescanexistbyitselfmapbuilder)<br> builder for Map payloads |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap)<br> output class for Map payloads |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalPropertiesBoxed](#additionalpropertiesboxed)<br> abstract sealed validated payload class |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalPropertiesBoxedBoolean](#additionalpropertiesboxedboolean)<br> boxed class to store validated boolean payloads |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalProperties](#additionalproperties)<br> schema class |

## AdditionalpropertiesCanExistByItself1Boxed
public static abstract sealed class AdditionalpropertiesCanExistByItself1Boxed<br>
permits<br>
[AdditionalpropertiesCanExistByItself1BoxedMap](#additionalpropertiescanexistbyitself1boxedmap)

abstract sealed class that stores validated payloads using boxed classes

## AdditionalpropertiesCanExistByItself1BoxedMap
public static final class AdditionalpropertiesCanExistByItself1BoxedMap<br>
extends [AdditionalpropertiesCanExistByItself1Boxed](#additionalpropertiescanexistbyitself1boxed)

a boxed class to store validated Map payloads, sealed permits class implementation

### Constructor Summary
| Constructor and Description |
| --------------------------- |
| AdditionalpropertiesCanExistByItself1BoxedMap([AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) data)<br>Creates an instance, private visibility |

### Field Summary
| Modifier and Type | Field and Description |
| ----------------- | ---------------------- |
| [AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) | data<br>validated payload |

## AdditionalpropertiesCanExistByItself1
public static class AdditionalpropertiesCanExistByItself1<br>
extends JsonSchema
Expand Down Expand Up @@ -57,6 +86,7 @@ AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap val
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| [AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) | validate([Map&lt;?, ?&gt;](#additionalpropertiescanexistbyitselfmapbuilder) arg, SchemaConfiguration configuration) |
| [AdditionalpropertiesCanExistByItself1BoxedMap](#additionalpropertiescanexistbyitself1boxedmap) | validateAndBox([Map&lt;?, ?&gt;](#additionalpropertiescanexistbyitselfmapbuilder) arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
## AdditionalpropertiesCanExistByItselfMapBuilder
public class AdditionalpropertiesCanExistByItselfMapBuilder<br>
Expand Down Expand Up @@ -87,14 +117,38 @@ A class to store validated Map payloads
| static [AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) | of([Map<String, Boolean>](#additionalpropertiescanexistbyitselfmapbuilder) arg, SchemaConfiguration configuration) |
| boolean | getAdditionalProperty(String name)<br>provides type safety for additional properties |

## AdditionalPropertiesBoxed
public static abstract sealed class AdditionalPropertiesBoxed<br>
permits<br>
[AdditionalPropertiesBoxedBoolean](#additionalpropertiesboxedboolean)

abstract sealed class that stores validated payloads using boxed classes

## AdditionalPropertiesBoxedBoolean
public static final class AdditionalPropertiesBoxedBoolean<br>
extends [AdditionalPropertiesBoxed](#additionalpropertiesboxed)

a boxed class to store validated boolean payloads, sealed permits class implementation

### Constructor Summary
| Constructor and Description |
| --------------------------- |
| AdditionalPropertiesBoxedBoolean(boolean data)<br>Creates an instance, private visibility |

### Field Summary
| Modifier and Type | Field and Description |
| ----------------- | ---------------------- |
| boolean | data<br>validated payload |

## AdditionalProperties
public static class AdditionalProperties<br>
extends BooleanJsonSchema
extends BooleanJsonSchema.BooleanJsonSchema1

A schema class that validates payloads

| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema |
| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 |
| ------------------------------------------------------------------ |
| validate |
| validateAndBox |

[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md)
Loading