Skip to content

Commit

Permalink
regenerate on top of master 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Durand-Tremblay committed Jun 15, 2022
1 parent 687dbf9 commit f4043c9
Show file tree
Hide file tree
Showing 89 changed files with 4,230 additions and 416 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import io.swagger.v3.oas.models.responses.ApiResponses;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.parser.core.models.ParseOptions;

import org.openapitools.codegen.config.CodegenConfigurator;
import org.openapitools.codegen.config.GlobalSettings;
import org.openapitools.codegen.model.ModelMap;
Expand Down Expand Up @@ -3717,7 +3716,7 @@ public void testComposedPropertyTypes() {
modelName = "ObjectWithComposedProperties";
CodegenModel m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
/* TODO inline allOf schema are created as separate models and the following assumptions that
the properties are non-model are no longer valid and need to be revised
the properties are non-model are no longer valid and need to be revised
assertTrue(m.vars.get(0).getIsMap());
assertTrue(m.vars.get(1).getIsNumber());
assertTrue(m.vars.get(2).getIsUnboundedInteger());
Expand Down Expand Up @@ -4216,6 +4215,12 @@ public void testNullabelObjectProperties() {
String propertyName;
CodegenProperty property;

// Non regression on regular oneOf construct
propertyName = "nonNullableProperty";
property = codegen.fromProperty(propertyName, (Schema) schema.getProperties().get(propertyName));
assertEquals(property.openApiType, "oneOf<string,number>");
// oneOf property resolve to any type and is set to nullable

// openapi 3.0 nullable
propertyName = "propertyName30";
property = codegen.fromProperty(propertyName, (Schema) schema.getProperties().get(propertyName));
Expand All @@ -4227,11 +4232,5 @@ public void testNullabelObjectProperties() {
property = codegen.fromProperty(propertyName, (Schema) schema.getProperties().get(propertyName));
assertEquals(property.openApiType, "PropertyType");
assertTrue(property.isNullable);

// Non regression on regular oneOf construct
propertyName = "nonNullableProperty";
property = codegen.fromProperty(propertyName, (Schema) schema.getProperties().get(propertyName));
assertEquals(property.openApiType, "oneOf<string,number>");
// oneOf property resolve to any type and is set to nullable
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
#
# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)

name: Java CI with Maven

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
build:
name: Build Title
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8' ]
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --no-transfer-progress --file pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.github/workflows/maven.yml
.gitignore
.travis.yml
README.md
Expand All @@ -6,6 +7,10 @@ build.gradle
build.sbt
docs/DefaultApi.md
docs/ModelWithNullableObjectProperty.md
docs/ModelWithNullableObjectPropertyNonNullableProperty.md
docs/ModelWithNullableObjectPropertyPropertyName30.md
docs/ModelWithNullableObjectPropertyPropertyName31.md
docs/ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes.md
docs/OtherPropertyType.md
docs/PropertyType.md
git_push.sh
Expand All @@ -29,5 +34,9 @@ src/main/java/org/openapitools/client/ServerVariable.java
src/main/java/org/openapitools/client/api/DefaultApi.java
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
src/main/java/org/openapitools/client/model/ModelWithNullableObjectProperty.java
src/main/java/org/openapitools/client/model/ModelWithNullableObjectPropertyNonNullableProperty.java
src/main/java/org/openapitools/client/model/ModelWithNullableObjectPropertyPropertyName30.java
src/main/java/org/openapitools/client/model/ModelWithNullableObjectPropertyPropertyName31.java
src/main/java/org/openapitools/client/model/ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes.java
src/main/java/org/openapitools/client/model/OtherPropertyType.java
src/main/java/org/openapitools/client/model/PropertyType.java
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.1-SNAPSHOT
6.0.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ Class | Method | HTTP request | Description
## Documentation for Models

- [ModelWithNullableObjectProperty](docs/ModelWithNullableObjectProperty.md)
- [ModelWithNullableObjectPropertyNonNullableProperty](docs/ModelWithNullableObjectPropertyNonNullableProperty.md)
- [ModelWithNullableObjectPropertyPropertyName30](docs/ModelWithNullableObjectPropertyPropertyName30.md)
- [ModelWithNullableObjectPropertyPropertyName31](docs/ModelWithNullableObjectPropertyPropertyName31.md)
- [ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes](docs/ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes.md)
- [OtherPropertyType](docs/OtherPropertyType.md)
- [PropertyType](docs/PropertyType.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,21 @@ components:
example:
propertyName:
foo: foo
nonNullableProperty: ""
propertyName31: ""
propertyName30: ""
propertyWithNullAndTwoTypes: ""
nonNullableProperty: null
propertyName31: null
propertyName30: null
propertyWithNullAndTwoTypes: null
properties:
propertyName:
$ref: '#/components/schemas/PropertyType'
propertyName30:
nullable: true
oneOf:
- $ref: '#/components/schemas/PropertyType'
$ref: '#/components/schemas/ModelWithNullableObjectProperty_propertyName30'
propertyName31:
oneOf:
- type: "null"
- $ref: '#/components/schemas/PropertyType'
$ref: '#/components/schemas/ModelWithNullableObjectProperty_propertyName31'
nonNullableProperty:
oneOf:
- type: string
- type: number
$ref: '#/components/schemas/ModelWithNullableObjectProperty_nonNullableProperty'
propertyWithNullAndTwoTypes:
oneOf:
- type: "null"
- $ref: '#/components/schemas/PropertyType'
- $ref: '#/components/schemas/OtherPropertyType'
$ref: '#/components/schemas/ModelWithNullableObjectProperty_propertyWithNullAndTwoTypes'
PropertyType:
example:
foo: foo
Expand All @@ -56,4 +47,21 @@ components:
properties:
bar:
type: string
ModelWithNullableObjectProperty_propertyName30:
nullable: true
oneOf:
- $ref: '#/components/schemas/PropertyType'
ModelWithNullableObjectProperty_propertyName31:
oneOf:
- type: "null"
- $ref: '#/components/schemas/PropertyType'
ModelWithNullableObjectProperty_nonNullableProperty:
oneOf:
- type: string
- type: number
ModelWithNullableObjectProperty_propertyWithNullAndTwoTypes:
oneOf:
- type: "null"
- $ref: '#/components/schemas/PropertyType'
- $ref: '#/components/schemas/OtherPropertyType'

Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ artifacts {

ext {
swagger_annotations_version = "1.5.22"
jackson_version = "2.10.4"
jackson_version = "2.13.0"
jakarta_annotation_version = "1.3.5"
junit_version = "4.13.1"
junit_version = "4.13.2"
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**operation**](DefaultApi.md#operation) | **GET** / |
[**operationWithHttpInfo**](DefaultApi.md#operationWithHttpInfo) | **GET** / |
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**operation**](DefaultApi.md#operation) | **GET** / | |
| [**operationWithHttpInfo**](DefaultApi.md#operationWithHttpInfo) | **GET** / | |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**propertyName** | [**PropertyType**](PropertyType.md) | | [optional]
**propertyName30** | [**PropertyType**](PropertyType.md) | | [optional]
**propertyName31** | [**PropertyType**](PropertyType.md) | | [optional]
**nonNullableProperty** | [**OneOfstringnumber**](OneOfstringnumber.md) | | [optional]
**propertyWithNullAndTwoTypes** | [**OneOfnullPropertyTypeOtherPropertyType**](OneOfnullPropertyTypeOtherPropertyType.md) | | [optional]
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**propertyName** | [**PropertyType**](PropertyType.md) | | [optional] |
|**propertyName30** | [**ModelWithNullableObjectPropertyPropertyName30**](ModelWithNullableObjectPropertyPropertyName30.md) | | [optional] |
|**propertyName31** | [**ModelWithNullableObjectPropertyPropertyName31**](ModelWithNullableObjectPropertyPropertyName31.md) | | [optional] |
|**nonNullableProperty** | [**ModelWithNullableObjectPropertyNonNullableProperty**](ModelWithNullableObjectPropertyNonNullableProperty.md) | | [optional] |
|**propertyWithNullAndTwoTypes** | [**ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes**](ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes.md) | | [optional] |



Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@


# ModelWithNullableObjectPropertyNonNullableProperty

## oneOf schemas
* [BigDecimal](BigDecimal.md)
* [String](String.md)

## Example
```java
// Import classes:
import org.openapitools.client.model.ModelWithNullableObjectPropertyNonNullableProperty;
import org.openapitools.client.model.BigDecimal;
import org.openapitools.client.model.String;

public class Example {
public static void main(String[] args) {
ModelWithNullableObjectPropertyNonNullableProperty exampleModelWithNullableObjectPropertyNonNullableProperty = new ModelWithNullableObjectPropertyNonNullableProperty();

// create a new BigDecimal
BigDecimal exampleBigDecimal = new BigDecimal();
// set ModelWithNullableObjectPropertyNonNullableProperty to BigDecimal
exampleModelWithNullableObjectPropertyNonNullableProperty.setActualInstance(exampleBigDecimal);
// to get back the BigDecimal set earlier
BigDecimal testBigDecimal = (BigDecimal) exampleModelWithNullableObjectPropertyNonNullableProperty.getActualInstance();

// create a new String
String exampleString = new String();
// set ModelWithNullableObjectPropertyNonNullableProperty to String
exampleModelWithNullableObjectPropertyNonNullableProperty.setActualInstance(exampleString);
// to get back the String set earlier
String testString = (String) exampleModelWithNullableObjectPropertyNonNullableProperty.getActualInstance();
}
}
```


Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@


# ModelWithNullableObjectPropertyPropertyName30

## oneOf schemas
* [PropertyType](PropertyType.md)

NOTE: this class is nullable.

## Example
```java
// Import classes:
import org.openapitools.client.model.ModelWithNullableObjectPropertyPropertyName30;
import org.openapitools.client.model.PropertyType;

public class Example {
public static void main(String[] args) {
ModelWithNullableObjectPropertyPropertyName30 exampleModelWithNullableObjectPropertyPropertyName30 = new ModelWithNullableObjectPropertyPropertyName30();

// create a new PropertyType
PropertyType examplePropertyType = new PropertyType();
// set ModelWithNullableObjectPropertyPropertyName30 to PropertyType
exampleModelWithNullableObjectPropertyPropertyName30.setActualInstance(examplePropertyType);
// to get back the PropertyType set earlier
PropertyType testPropertyType = (PropertyType) exampleModelWithNullableObjectPropertyPropertyName30.getActualInstance();
}
}
```


Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@


# ModelWithNullableObjectPropertyPropertyName31

## oneOf schemas
* [PropertyType](PropertyType.md)

NOTE: this class is nullable.

## Example
```java
// Import classes:
import org.openapitools.client.model.ModelWithNullableObjectPropertyPropertyName31;
import org.openapitools.client.model.PropertyType;

public class Example {
public static void main(String[] args) {
ModelWithNullableObjectPropertyPropertyName31 exampleModelWithNullableObjectPropertyPropertyName31 = new ModelWithNullableObjectPropertyPropertyName31();

// create a new PropertyType
PropertyType examplePropertyType = new PropertyType();
// set ModelWithNullableObjectPropertyPropertyName31 to PropertyType
exampleModelWithNullableObjectPropertyPropertyName31.setActualInstance(examplePropertyType);
// to get back the PropertyType set earlier
PropertyType testPropertyType = (PropertyType) exampleModelWithNullableObjectPropertyPropertyName31.getActualInstance();
}
}
```


Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@


# ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes

## oneOf schemas
* [OtherPropertyType](OtherPropertyType.md)
* [PropertyType](PropertyType.md)

NOTE: this class is nullable.

## Example
```java
// Import classes:
import org.openapitools.client.model.ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes;
import org.openapitools.client.model.OtherPropertyType;
import org.openapitools.client.model.PropertyType;

public class Example {
public static void main(String[] args) {
ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes exampleModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes = new ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes();

// create a new OtherPropertyType
OtherPropertyType exampleOtherPropertyType = new OtherPropertyType();
// set ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes to OtherPropertyType
exampleModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes.setActualInstance(exampleOtherPropertyType);
// to get back the OtherPropertyType set earlier
OtherPropertyType testOtherPropertyType = (OtherPropertyType) exampleModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes.getActualInstance();

// create a new PropertyType
PropertyType examplePropertyType = new PropertyType();
// set ModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes to PropertyType
exampleModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes.setActualInstance(examplePropertyType);
// to get back the PropertyType set earlier
PropertyType testPropertyType = (PropertyType) exampleModelWithNullableObjectPropertyPropertyWithNullAndTwoTypes.getActualInstance();
}
}
```


Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional]
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**bar** | **String** | | [optional] |



Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**foo** | **String** | | [optional]
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**foo** | **String** | | [optional] |



Loading

0 comments on commit f4043c9

Please sign in to comment.