forked from loafle/openapi-generator-original
* C client generator improvement to support: openapi-generator/modules/openapi-generator/src/test/resources/3_0/petstore.yaml * Improvements to the C client generator: - moved base64* from apiClient.c to binary.h/binary.c - changed CR/LF to LF in binary.h/binary.c * C client generator: better support for base64encode / base64decode
42 lines
776 B
C
42 lines
776 B
C
/*
|
|
* api_response.h
|
|
*
|
|
* Describes the result of uploading an image resource
|
|
*/
|
|
|
|
#ifndef _api_response_H_
|
|
#define _api_response_H_
|
|
|
|
#include <string.h>
|
|
#include "../external/cJSON.h"
|
|
#include "../include/list.h"
|
|
#include "../include/keyValuePair.h"
|
|
#include "../include/binary.h"
|
|
|
|
typedef struct api_response_t api_response_t;
|
|
|
|
|
|
|
|
|
|
typedef struct api_response_t {
|
|
int code; //numeric
|
|
char *type; // string
|
|
char *message; // string
|
|
|
|
} api_response_t;
|
|
|
|
api_response_t *api_response_create(
|
|
int code,
|
|
char *type,
|
|
char *message
|
|
);
|
|
|
|
void api_response_free(api_response_t *api_response);
|
|
|
|
api_response_t *api_response_parseFromJSON(cJSON *api_responseJSON);
|
|
|
|
cJSON *api_response_convertToJSON(api_response_t *api_response);
|
|
|
|
#endif /* _api_response_H_ */
|
|
|