forked from loafle/openapi-generator-original
Add C++ UE4 client generator (#6399)
* Added new language: UE4 C++ client * rename generator * add copyright * update doc * fix with Locale.ROOT * add new file * minor improvements * remove postProcessModels Co-authored-by: Samuel Kahn <samuel@kahncode.com>
This commit is contained in:
63
samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApi.h
Normal file
63
samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApi.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* 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) const;
|
||||
void OnGetInventoryResponse(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FGetInventoryDelegate Delegate) const;
|
||||
void OnGetOrderByIdResponse(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FGetOrderByIdDelegate Delegate) const;
|
||||
void OnPlaceOrderResponse(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FPlaceOrderDelegate Delegate) const;
|
||||
|
||||
bool IsValid() const;
|
||||
void HandleResponse(FHttpResponsePtr HttpResponse, bool bSucceeded, Response& InOutResponse) const;
|
||||
|
||||
FString Url;
|
||||
TMap<FString,FString> AdditionalHeaderParams;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user