mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-16 22:50:52 +00:00
* Add java-jersey2 sample with mixed oneOf * [java][jersey2]Fix client generation if oneOf contains an array type Changes: * Change jersey2/oneof_model template to use composed schema data * Change adding of imports in AbstractJavaCodegen to use composed schema data * Add escapedDataType property to CodegenProperty so that the data type may be part of identifiers (e.g. in getters) * Update samples * Add sample for multiple array in oneOf * Fix generation of constructors with same erasures * Update samples again * Version bump * Add new sample folders to CI * Make primitive handling more explicit * Replace escapedDataType property with Mustache lambda * Update samples with new primitive handling and sanitization lambda
1.6 KiB
1.6 KiB
DefaultApi
All URIs are relative to http://api.example.xyz/v1
Method | HTTP request | Description |
---|---|---|
callList | GET /example |
callList
Example callList()
Example
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://api.example.xyz/v1");
DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
Example result = apiInstance.callList();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#callList");
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
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |