forked from loafle/openapi-generator-original
* [cpp-ue4] Fixed enum values not being quoted. I'm not sure when this started breaking. * [cpp-ue4] UE 4.26 Compatibility: Replaced TSharedRef<IHttpRequest by FHttpRequestRef for better portability * [cpp-ue4] Improved DateTime parsing * [cpp-ue4] Made HttpFileInput constructors explicit * [cpp-ue4] Added the possibility to retry requests easily with AsyncRetry method on the response and SetAutoRetryCount on the request WIP auto retry [cpp-ue4] Adds support for instant retry * [cpp-ue4] Using TaskGraph instead of TaskGraphMainThread for async retries * update samples * remove trailing spaces Co-authored-by: Jean-Noel Gourdol <jngourdol@stormancer.com> Co-authored-by: William Cheng <wing328hk@gmail.com>
65 lines
2.5 KiB
C++
65 lines
2.5 KiB
C++
/**
|
|
* OpenAPI Petstore
|
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
*
|
|
* OpenAPI spec version: 1.0.0
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator
|
|
* https://github.com/OpenAPITools/openapi-generator
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "OpenAPIBaseModel.h"
|
|
|
|
namespace OpenAPI
|
|
{
|
|
|
|
class OPENAPI_API OpenAPIStoreApi
|
|
{
|
|
public:
|
|
OpenAPIStoreApi();
|
|
~OpenAPIStoreApi();
|
|
|
|
void SetURL(const FString& Url);
|
|
void AddHeaderParam(const FString& Key, const FString& Value);
|
|
void ClearHeaderParams();
|
|
|
|
class DeleteOrderRequest;
|
|
class DeleteOrderResponse;
|
|
class GetInventoryRequest;
|
|
class GetInventoryResponse;
|
|
class GetOrderByIdRequest;
|
|
class GetOrderByIdResponse;
|
|
class PlaceOrderRequest;
|
|
class PlaceOrderResponse;
|
|
|
|
DECLARE_DELEGATE_OneParam(FDeleteOrderDelegate, const DeleteOrderResponse&);
|
|
DECLARE_DELEGATE_OneParam(FGetInventoryDelegate, const GetInventoryResponse&);
|
|
DECLARE_DELEGATE_OneParam(FGetOrderByIdDelegate, const GetOrderByIdResponse&);
|
|
DECLARE_DELEGATE_OneParam(FPlaceOrderDelegate, const PlaceOrderResponse&);
|
|
|
|
bool DeleteOrder(const DeleteOrderRequest& Request, const FDeleteOrderDelegate& Delegate = FDeleteOrderDelegate()) const;
|
|
bool GetInventory(const GetInventoryRequest& Request, const FGetInventoryDelegate& Delegate = FGetInventoryDelegate()) const;
|
|
bool GetOrderById(const GetOrderByIdRequest& Request, const FGetOrderByIdDelegate& Delegate = FGetOrderByIdDelegate()) const;
|
|
bool PlaceOrder(const PlaceOrderRequest& Request, const FPlaceOrderDelegate& Delegate = FPlaceOrderDelegate()) const;
|
|
|
|
|
|
private:
|
|
void OnDeleteOrderResponse(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FDeleteOrderDelegate Delegate, int AutoRetryCount) const;
|
|
void OnGetInventoryResponse(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FGetInventoryDelegate Delegate, int AutoRetryCount) const;
|
|
void OnGetOrderByIdResponse(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FGetOrderByIdDelegate Delegate, int AutoRetryCount) const;
|
|
void OnPlaceOrderResponse(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FPlaceOrderDelegate Delegate, int AutoRetryCount) const;
|
|
|
|
bool IsValid() const;
|
|
void HandleResponse(FHttpResponsePtr HttpResponse, bool bSucceeded, Response& InOutResponse) const;
|
|
|
|
FString Url;
|
|
TMap<FString,FString> AdditionalHeaderParams;
|
|
};
|
|
|
|
}
|