Better inline model resolver to handle inline schema in array item (#12104)

* better support of inline schema in array item

* update tests

* update samples

* regenerate samples

* fix allof naming, remove files

* add files

* update samples

* update readme

* fix tests

* update samples

* update samples

* add new files

* update test spec

* add back tests

* remove unused files

* comment out python test

* update js test using own spec

* remove files

* remove unused files

* remove files

* remove unused files

* better handling of allOf with a single type

* comment out go test

* remove test_all_of_with_single_ref_single_ref_type.py

* fix inline resolver, uncomment go test
This commit is contained in:
William Cheng
2022-04-20 10:28:15 +08:00
committed by GitHub
parent 12454de3ac
commit 8330e16d66
200 changed files with 7495 additions and 975 deletions

View File

@@ -0,0 +1,61 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.SingleRefType;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import org.junit.jupiter.api.Test;
/**
* Model tests for AllOfWithSingleRef
*/
class AllOfWithSingleRefTest {
private final AllOfWithSingleRef model = new AllOfWithSingleRef();
/**
* Model tests for AllOfWithSingleRef
*/
@Test
void testAllOfWithSingleRef() {
// TODO: test AllOfWithSingleRef
}
/**
* Test the property 'username'
*/
@Test
void usernameTest() {
// TODO: test username
}
/**
* Test the property 'singleRefType'
*/
@Test
void singleRefTypeTest() {
// TODO: test singleRefType
}
}

View File

@@ -17,15 +17,15 @@ import org.junit.jupiter.api.Test;
/**
* Model tests for UserType
* Model tests for SingleRefType
*/
class UserTypeTest {
class SingleRefTypeTest {
/**
* Model tests for UserType
* Model tests for SingleRefType
*/
@Test
void testUserType() {
// TODO: test UserType
void testSingleRefType() {
// TODO: test SingleRefType
}
}