mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-05 08:20:53 +00:00
* New modified model header and body mustache for c client generator * remove uncrustify from cmake as it is used during code generation, also remove valgrind as it is not used * add function to encode and decode binary data * update model mustache * update api body and header mustache for handling all types of parameters * update model mustache with variable names and address few more issues to generate working codes * updated api body and header mustaches with support for various new parameters and fix some issues as per new changes in code flow structure * update apiClient header and body mustache as per new modifications for handling binary data and few more stuff * updated samples generated by new modified mustache * update handling of file and binary data type to binary_t * update samples with recent commit on master regarding c-generator * update cmakelist which was ignored by .openapi-generator-ignore, cleanup external folder * update CMakeList mustache to show how to use compiled libary to compile source files * update samples with new cmake * Add comments explaining what each command is doing inshort * remove freeing of base path as it is not memory allocated * update samples to free apiclient object when the requirement is over * add missing cJSON delete to fix memory not freed bugs * use uncrustify to beautify manual written test code
38 lines
763 B
C
38 lines
763 B
C
/*
|
|
* user.h
|
|
*
|
|
* A User who is purchasing from the pet store
|
|
*/
|
|
|
|
#ifndef _user_H_
|
|
#define _user_H_
|
|
|
|
#include <string.h>
|
|
#include "../external/cJSON.h"
|
|
#include "../include/list.h"
|
|
#include "../include/keyValuePair.h"
|
|
|
|
|
|
|
|
typedef struct user_t {
|
|
long id; // numeric
|
|
char *username; // string
|
|
char *firstName; // string
|
|
char *lastName; // string
|
|
char *email; // string
|
|
char *password; // string
|
|
char *phone; // string
|
|
int userStatus; // numeric
|
|
} user_t;
|
|
|
|
user_t *user_create(long id, char *username, char *firstName, char *lastName,
|
|
char *email, char *password, char *phone, int userStatus);
|
|
|
|
void user_free(user_t *user);
|
|
|
|
user_t *user_parseFromJSON(cJSON *userJSON);
|
|
|
|
cJSON *user_convertToJSON(user_t *user);
|
|
|
|
#endif /* _user_H_ */
|