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

Java, adds schema docs #299

Merged
merged 72 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
85d97da
Adds draft schema docs with partial info
spacether Nov 25, 2023
8bfbf44
Changes python to java types
spacether Nov 25, 2023
f7154f5
Adds schema name to doc, adds ref link
spacether Nov 25, 2023
37a2423
Fixes schema readline link to ref schemas and listed file location
spacether Nov 25, 2023
cb2e6bd
Works on schema doc types
spacether Nov 25, 2023
abdd563
Improves input type for array and map in schema docs
spacether Nov 25, 2023
ba7caf0
passes in forceNull so types match java
spacether Nov 25, 2023
cab1955
Turns on header for input map keys
spacether Nov 25, 2023
9072926
New section removed, map output header added
spacether Nov 25, 2023
1fa66cc
Adds output type base class
spacether Nov 25, 2023
887d545
reverts the segment templates
spacether Nov 25, 2023
4aa6ed3
Uses whitespace control char to fix segment Object
spacether Nov 25, 2023
42cd886
Fixes input type template issues
spacether Nov 25, 2023
d25a3d2
Changes to fixed input typ template
spacether Nov 25, 2023
23f7247
Fixes input type whitespace
spacether Nov 25, 2023
b5ba3c3
Updates output type template to eliminare endChar and fix whitespace
spacether Nov 25, 2023
2a2a064
Removes endChar usages
spacether Nov 25, 2023
5ee9f93
Fixes output base class type info
spacether Nov 25, 2023
c22a39c
Adds types of map key value inputs
spacether Nov 25, 2023
2f570d1
Adds notes info for map key value inputs
spacether Nov 25, 2023
5e53e11
Adds methods
spacether Nov 25, 2023
b735aee
Adds method info to map output type
spacether Nov 25, 2023
1a7b90f
Adds array model headers and input and output types
spacether Nov 25, 2023
3935dc4
Adds list item type
spacether Nov 25, 2023
4c138df
Updates schema docs to look like javadoc
spacether Nov 25, 2023
5549734
Adds nested class summary
spacether Nov 25, 2023
179f493
Makes inner classes static
spacether Nov 25, 2023
7e014df
Adds extension info for classes
spacether Nov 25, 2023
f7209b1
Adds and uses a reverse template helper in schema docs
spacether Nov 26, 2023
ef13bb8
Prints only schema in docs
spacether Nov 26, 2023
74b1edc
Moves array template to separate part of schema docs
spacether Nov 26, 2023
87eddbf
Moves map output class in docs
spacether Nov 26, 2023
5e6d917
For ref schemas, adds extension info to docs
spacether Nov 27, 2023
d1a42d3
Adds links to ref schemas
spacether Nov 27, 2023
94bef09
Adds link to output type in validate method
spacether Nov 27, 2023
feb0b1a
Adds link for schema validate for list output types
spacether Nov 27, 2023
577cdb5
Adds nested class links
spacether Nov 27, 2023
6f0bda8
Improves list output type docs
spacether Nov 27, 2023
74c3cfb
Adds output type links for of methods
spacether Nov 27, 2023
d8e99a2
Improves doc validate signatures for array and map output types
spacether Nov 27, 2023
06fc369
Makes schema classes static
spacether Nov 27, 2023
c7272ee
Fixes formatting for map input keys
spacether Nov 27, 2023
54aafd4
Uses isSimpleString in schema class writing
spacether Nov 27, 2023
edf3d6b
Uses isSimpleNull
spacether Nov 27, 2023
c9a9bd8
isSimpleInteger isSimpleNumber
spacether Nov 27, 2023
0f6df20
Uses isSimpleBoolean
spacether Nov 27, 2023
ca368da
Uses isSimpleArray
spacether Nov 27, 2023
b343ba4
Uses isSimpleObject
spacether Nov 27, 2023
9971d8a
Uses isSimpleAnyType
spacether Nov 27, 2023
f928672
Adds line breaks before class extension line in schema docs
spacether Nov 27, 2023
dc08408
Corrects schema extension lines
spacether Nov 28, 2023
0796b83
Adds doc link for self ref
spacether Nov 28, 2023
0a9bac4
Adds ref schema extension to docs with links
spacether Nov 28, 2023
89a87e8
Fixes links to component sschemas in readme
spacether Nov 28, 2023
16c567f
Adds keywordToValidator info
spacether Nov 28, 2023
e33333b
Adds field summary, breaks table
spacether Nov 28, 2023
ca0ceca
Adds list link in schema doc for properties
spacether Nov 28, 2023
c8d4bf1
Adds link to map type
spacether Nov 28, 2023
3f303f1
Fixes all list and map type property outputs
spacether Nov 28, 2023
2d74d26
Uses forDocs in type
spacether Nov 28, 2023
9910933
Updates format template
spacether Nov 28, 2023
2227cfa
Fixes schema docs for keywordToValidator properties
spacether Nov 28, 2023
06e62ef
Fixes indentation for keywordToValidator
spacether Nov 28, 2023
722bd08
Adds forDocs to items
spacether Nov 28, 2023
cbe153d
Adds forDocs higher up
spacether Nov 28, 2023
3ae8146
Fixes indentation in addProps if keywordToValidator
spacether Nov 28, 2023
7e5a3e3
Adds docs links for items schemas
spacether Nov 28, 2023
3bb209b
Adds addProps docs links
spacether Nov 28, 2023
3592fa0
Adds links to schema properties
spacether Nov 28, 2023
26b6b11
Removes field summary and method summary when schema classes extend p…
spacether Nov 28, 2023
df80955
Lists that the validate method is inherited from schemas.XJsonSchema
spacether Nov 28, 2023
39afe71
Removes pythn reference from java docs
spacether Nov 28, 2023
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
  •  
  •  
  •  
299 changes: 299 additions & 0 deletions samples/client/petstore/java/.openapi-generator/FILES

Large diffs are not rendered by default.

294 changes: 147 additions & 147 deletions samples/client/petstore/java/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Int32JsonContentTypeHeaderSchema
org.openapijsonschematools.components.headers.int32jsoncontenttypeheader.content.applicationjson.Int32JsonContentTypeHeaderSchema.java
public class Int32JsonContentTypeHeaderSchema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Int32JsonContentTypeHeaderSchema.Int32JsonContentTypeHeaderSchema1](#int32jsoncontenttypeheaderschema1)<br> schema class |

## Int32JsonContentTypeHeaderSchema1
public static class Int32JsonContentTypeHeaderSchema1<br>
extends Int32JsonSchema

A schema class that validates payloads
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# NumberHeaderSchema
org.openapijsonschematools.components.headers.numberheader.NumberHeaderSchema.java
public class NumberHeaderSchema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [NumberHeaderSchema.NumberHeaderSchema1](#numberheaderschema1)<br> schema class |

## NumberHeaderSchema1
public static class NumberHeaderSchema1<br>
extends DecimalJsonSchema

A schema class that validates payloads

| Methods Inherited from class org.openapijsonschematools.schemas.DecimalJsonSchema |
| ------------------------------------------------------------------ |
| validate |
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# RefContentSchemaHeaderSchema
org.openapijsonschematools.components.headers.refcontentschemaheader.content.applicationjson.RefContentSchemaHeaderSchema.java
public class RefContentSchemaHeaderSchema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [RefContentSchemaHeaderSchema.RefContentSchemaHeaderSchema1](#refcontentschemaheaderschema1)<br> schema class |

## RefContentSchemaHeaderSchema1
public static class RefContentSchemaHeaderSchema1<br>
extends [StringWithValidation.StringWithValidation1](../../../../../components/schemas/StringWithValidation.md#stringwithvalidation1)

A schema class that validates payloads
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# RefSchemaHeaderSchema
org.openapijsonschematools.components.headers.refschemaheader.RefSchemaHeaderSchema.java
public class RefSchemaHeaderSchema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [RefSchemaHeaderSchema.RefSchemaHeaderSchema1](#refschemaheaderschema1)<br> schema class |

## RefSchemaHeaderSchema1
public static class RefSchemaHeaderSchema1<br>
extends [StringWithValidation.StringWithValidation1](../../../components/schemas/StringWithValidation.md#stringwithvalidation1)

A schema class that validates payloads
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# StringHeaderSchema
org.openapijsonschematools.components.headers.stringheader.StringHeaderSchema.java
public class StringHeaderSchema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [StringHeaderSchema.StringHeaderSchema1](#stringheaderschema1)<br> schema class |

## StringHeaderSchema1
public static class StringHeaderSchema1<br>
extends StringJsonSchema

A schema class that validates payloads

| Methods Inherited from class org.openapijsonschematools.schemas.StringJsonSchema |
| ------------------------------------------------------------------ |
| validate |
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Schema
org.openapijsonschematools.components.parameters.componentrefschemastringwithvalidation.content.applicationjson.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |

## Schema1
public static class Schema1<br>
extends [StringWithValidation.StringWithValidation1](../../../../../components/schemas/StringWithValidation.md#stringwithvalidation1)

A schema class that validates payloads
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Schema
org.openapijsonschematools.components.parameters.pathusername.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |

## Schema1
public static class Schema1<br>
extends StringJsonSchema

A schema class that validates payloads

| Methods Inherited from class org.openapijsonschematools.schemas.StringJsonSchema |
| ------------------------------------------------------------------ |
| validate |
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Schema
org.openapijsonschematools.components.parameters.refschemastringwithvalidation.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |

## Schema1
public static class Schema1<br>
extends [StringWithValidation.StringWithValidation1](../../../components/schemas/StringWithValidation.md#stringwithvalidation1)

A schema class that validates payloads
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Schema
org.openapijsonschematools.components.requestbodies.client.content.applicationjson.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |

## Schema1
public static class Schema1<br>
extends [Client.Client1](../../../../components/schemas/Client.md#client1)

A schema class that validates payloads
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Schema
org.openapijsonschematools.components.requestbodies.pet.content.applicationjson.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |

## Schema1
public static class Schema1<br>
extends [Pet.Pet1](../../../../components/schemas/Pet.md#pet1)

A schema class that validates payloads
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Schema
org.openapijsonschematools.components.requestbodies.pet.content.applicationxml.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |

## Schema1
public static class Schema1<br>
extends [RefPet.RefPet1](../../../../components/schemas/RefPet.md#refpet1)

A schema class that validates payloads
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Schema
org.openapijsonschematools.components.requestbodies.userarray.content.applicationjson.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |
| static class | [Schema.SchemaList](#schemalist)<br> output class for List payloads |

## Schema1
public static class Schema1<br>
extends JsonSchema

A schema class that validates payloads
### Field Summary
| Modifier and Type | Field and Description |
| ----------------- | ---------------------- |
| static LinkedHashMap<String, KeywordValidator> |keywordToValidator<br/>new LinkedHashMap<>(Map.ofEntries(<br/>&nbsp;&nbsp;&nbsp;&nbsp;new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),<br>&nbsp;&nbsp;&nbsp;&nbsp;new KeywordEntry("items", new ItemsValidator([User.User1.class](../../../../components/schemas/User.md#user1))<br>)); |

### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [SchemaList](#schemalist) | validate(List<Map<String, Object>> arg, SchemaConfiguration configuration) |

## SchemaList
public class SchemaList<br>
extends FrozenList<User.UserMap>

A class to store validated List payloads

### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [SchemaList](#schemalist) | of(List<Map<String, Object>> arg, SchemaConfiguration configuration) |

## Input List Items
```
type: List<Map<String, Object>>
```
List Item Type | Description | Notes
-------------------- | ------------- | -------------
Map<String, Object> | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# LocationSchema
org.openapijsonschematools.components.responses.headerswithnobody.headers.location.LocationSchema.java
public class LocationSchema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [LocationSchema.LocationSchema1](#locationschema1)<br> schema class |

## LocationSchema1
public static class LocationSchema1<br>
extends StringJsonSchema

A schema class that validates payloads

| Methods Inherited from class org.openapijsonschematools.schemas.StringJsonSchema |
| ------------------------------------------------------------------ |
| validate |
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Schema
org.openapijsonschematools.components.responses.successfulxmlandjsonarrayofpet.content.applicationjson.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |
| static class | [Schema.SchemaList](#schemalist)<br> output class for List payloads |

## Schema1
public static class Schema1<br>
extends JsonSchema

A schema class that validates payloads
### Field Summary
| Modifier and Type | Field and Description |
| ----------------- | ---------------------- |
| static LinkedHashMap<String, KeywordValidator> |keywordToValidator<br/>new LinkedHashMap<>(Map.ofEntries(<br/>&nbsp;&nbsp;&nbsp;&nbsp;new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),<br>&nbsp;&nbsp;&nbsp;&nbsp;new KeywordEntry("items", new ItemsValidator([RefPet.RefPet1.class](../../../../../components/schemas/RefPet.md#refpet1))<br>)); |

### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [SchemaList](#schemalist) | validate(List<Map<String, Object>> arg, SchemaConfiguration configuration) |

## SchemaList
public class SchemaList<br>
extends FrozenList<Pet.PetMap>

A class to store validated List payloads

### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [SchemaList](#schemalist) | of(List<Map<String, Object>> arg, SchemaConfiguration configuration) |

## Input List Items
```
type: List<Map<String, Object>>
```
List Item Type | Description | Notes
-------------------- | ------------- | -------------
Map<String, Object> | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Schema
org.openapijsonschematools.components.responses.successfulxmlandjsonarrayofpet.content.applicationxml.Schema.java
public class Schema

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

## Nested Class Summary
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [Schema.Schema1](#schema1)<br> schema class |
| static class | [Schema.SchemaList](#schemalist)<br> output class for List payloads |

## Schema1
public static class Schema1<br>
extends JsonSchema

A schema class that validates payloads
### Field Summary
| Modifier and Type | Field and Description |
| ----------------- | ---------------------- |
| static LinkedHashMap<String, KeywordValidator> |keywordToValidator<br/>new LinkedHashMap<>(Map.ofEntries(<br/>&nbsp;&nbsp;&nbsp;&nbsp;new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),<br>&nbsp;&nbsp;&nbsp;&nbsp;new KeywordEntry("items", new ItemsValidator([Pet.Pet1.class](../../../../../components/schemas/Pet.md#pet1))<br>)); |

### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [SchemaList](#schemalist) | validate(List<Map<String, Object>> arg, SchemaConfiguration configuration) |

## SchemaList
public class SchemaList<br>
extends FrozenList<Pet.PetMap>

A class to store validated List payloads

### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [SchemaList](#schemalist) | of(List<Map<String, Object>> arg, SchemaConfiguration configuration) |

## Input List Items
```
type: List<Map<String, Object>>
```
List Item Type | Description | Notes
-------------------- | ------------- | -------------
Map<String, Object> | |
Loading