forked from loafle/openapi-generator-original
* [C] Add test schemas for the recent changes The recent commit 47665aaa97cb ("Fix a few issues with the C generator (part 1 version 2) (#14434)") didn't include any test schemas. Add them now, as requested: https://github.com/OpenAPITools/openapi-generator/pull/14434#issuecomment-2497497110 * Update samples * Fix sample update with missing files * More fixes for sample updates
58 lines
1.0 KiB
C
58 lines
1.0 KiB
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"
|
|
#include "../include/binary.h"
|
|
|
|
typedef struct user_t user_t;
|
|
|
|
#include "any_type.h"
|
|
#include "preference.h"
|
|
|
|
|
|
|
|
typedef struct user_t {
|
|
long id; //numeric
|
|
char *username; // string
|
|
char *first_name; // string
|
|
char *last_name; // string
|
|
char *email; // string
|
|
char *password; // string
|
|
char *phone; // string
|
|
int user_status; //numeric
|
|
list_t* extra; //map
|
|
openapi_petstore_preference__e preference; //referenced enum
|
|
|
|
} user_t;
|
|
|
|
user_t *user_create(
|
|
long id,
|
|
char *username,
|
|
char *first_name,
|
|
char *last_name,
|
|
char *email,
|
|
char *password,
|
|
char *phone,
|
|
int user_status,
|
|
list_t* extra,
|
|
openapi_petstore_preference__e preference
|
|
);
|
|
|
|
void user_free(user_t *user);
|
|
|
|
user_t *user_parseFromJSON(cJSON *userJSON);
|
|
|
|
cJSON *user_convertToJSON(user_t *user);
|
|
|
|
#endif /* _user_H_ */
|
|
|