forked from loafle/openapi-generator-original
[java] update jakarta.validation-api to 3.0.2 (#18124)
* fix: jersey3 library fix issue that library failed in case pattern matching was used in the api. * add tests, update version * update * fix tag * fix, update samples * update build * more update * update workflow * test useJakarta --------- Co-authored-by: holomekc <30546982+holomekc@users.noreply.github.com>
This commit is contained in:
@@ -148,6 +148,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**getArrayOfEnums**](docs/FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**postArrayOfString**](docs/FakeApi.md#postArrayOfString) | **POST** /fake/request-array-string | Array of string
|
||||
*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
|
||||
@@ -1193,6 +1193,25 @@ paths:
|
||||
tags:
|
||||
- fake
|
||||
x-accepts: application/json
|
||||
/fake/request-array-string:
|
||||
post:
|
||||
operationId: postArrayOfString
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
pattern: "[A-Z0-9]+"
|
||||
type: string
|
||||
type: array
|
||||
responses:
|
||||
"200":
|
||||
description: ok
|
||||
summary: Array of string
|
||||
tags:
|
||||
- fake
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
components:
|
||||
requestBodies:
|
||||
UserArray:
|
||||
|
||||
@@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
|
||||
| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
|
||||
| [**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**postArrayOfString**](FakeApi.md#postArrayOfString) | **POST** /fake/request-array-string | Array of string |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
@@ -404,6 +405,68 @@ No authorization required
|
||||
| **200** | Got named array of enums | - |
|
||||
|
||||
|
||||
## postArrayOfString
|
||||
|
||||
> postArrayOfString(requestBody)
|
||||
|
||||
Array of string
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// 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.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
List<String> requestBody = Arrays.asList(); // List<String> |
|
||||
try {
|
||||
apiInstance.postArrayOfString(requestBody);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#postArrayOfString");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | **List<String>**| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | ok | - |
|
||||
|
||||
|
||||
## testAdditionalPropertiesReference
|
||||
|
||||
> testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
@@ -268,6 +268,40 @@ public class FakeApi {
|
||||
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||
null, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Array of string
|
||||
*
|
||||
* @param requestBody (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> ok </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public void postArrayOfString(List<String> requestBody) throws ApiException {
|
||||
postArrayOfStringWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of string
|
||||
*
|
||||
* @param requestBody (optional)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> ok </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<Void> postArrayOfStringWithHttpInfo(List<String> requestBody) throws ApiException {
|
||||
String localVarAccept = apiClient.selectHeaderAccept();
|
||||
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||
return apiClient.invokeAPI("FakeApi.postArrayOfString", "/fake/request-array-string", "POST", new ArrayList<>(), requestBody,
|
||||
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||
null, null, false);
|
||||
}
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user