forked from loafle/openapi-generator-original
[java] improve petstore tests with openapi v3 spec (#16447)
* regenerate tests in jersey2-java8 client * update samples * fix java google api client tests * update java resteasy to use v3 spec for tests * update java vertx to test with v3 spec * update java resttemplate to test with v3 spec * add new files * regenerate jersey1 tests
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# AllOfWithSingleRef
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**username** | **String** | | [optional] |
|
||||
|**singleRefType** | **SingleRefType** | | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# DefaultApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | |
|
||||
|
||||
|
||||
|
||||
## fooGet
|
||||
|
||||
> FooGetDefaultResponse fooGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.DefaultApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
DefaultApi apiInstance = new DefaultApi(defaultClient);
|
||||
try {
|
||||
FooGetDefaultResponse result = apiInstance.fooGet();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DefaultApi#fooGet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | response | - |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# DeprecatedObject
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**name** | **String** | | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# FakeBigDecimalMap200Response
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**someId** | **BigDecimal** | | [optional] |
|
||||
|**someMap** | **Map<String, BigDecimal>** | | [optional] |
|
||||
|
||||
|
||||
|
||||
13
samples/client/petstore/java/google-api-client/docs/Foo.md
Normal file
13
samples/client/petstore/java/google-api-client/docs/Foo.md
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# Foo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**bar** | **String** | | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# FooGetDefaultResponse
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**string** | [**Foo**](Foo.md) | | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# HealthCheckResult
|
||||
|
||||
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**nullableMessage** | **String** | | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
# NullableClass
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**integerProp** | **Integer** | | [optional] |
|
||||
|**numberProp** | **BigDecimal** | | [optional] |
|
||||
|**booleanProp** | **Boolean** | | [optional] |
|
||||
|**stringProp** | **String** | | [optional] |
|
||||
|**dateProp** | **LocalDate** | | [optional] |
|
||||
|**datetimeProp** | **OffsetDateTime** | | [optional] |
|
||||
|**arrayNullableProp** | **List<Object>** | | [optional] |
|
||||
|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] |
|
||||
|**arrayItemsNullable** | **List<Object>** | | [optional] |
|
||||
|**objectNullableProp** | **Map<String, Object>** | | [optional] |
|
||||
|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] |
|
||||
|**objectItemsNullable** | **Map<String, Object>** | | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
# ObjectWithDeprecatedFields
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**uuid** | **String** | | [optional] |
|
||||
|**id** | **BigDecimal** | | [optional] |
|
||||
|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] |
|
||||
|**bars** | **List<String>** | | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
# OuterEnumDefaultValue
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `PLACED` (value: `"placed"`)
|
||||
|
||||
* `APPROVED` (value: `"approved"`)
|
||||
|
||||
* `DELIVERED` (value: `"delivered"`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
# OuterEnumInteger
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `NUMBER_0` (value: `0`)
|
||||
|
||||
* `NUMBER_1` (value: `1`)
|
||||
|
||||
* `NUMBER_2` (value: `2`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
# OuterEnumIntegerDefaultValue
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `NUMBER_0` (value: `0`)
|
||||
|
||||
* `NUMBER_1` (value: `1`)
|
||||
|
||||
* `NUMBER_2` (value: `2`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# OuterObjectWithEnumProperty
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**value** | **OuterEnumInteger** | | |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# SingleRefType
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `ADMIN` (value: `"admin"`)
|
||||
|
||||
* `USER` (value: `"user"`)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user