Ernesto Fernández 037cb12f34
Tests for recent C fixes (#20200)
* [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
2024-11-28 16:27:42 +08:00

33 lines
982 B
C

/*
* preference.h
*
* A user's preference in pets
*/
#ifndef _preference_H_
#define _preference_H_
#include <string.h>
#include "../external/cJSON.h"
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
typedef struct preference_t preference_t;
// Enum for preference
typedef enum { openapi_petstore_preference__NULL = 0, openapi_petstore_preference__cats, openapi_petstore_preference__dogs, openapi_petstore_preference__birds, openapi_petstore_preference__fish, openapi_petstore_preference__snakes, openapi_petstore_preference__other } openapi_petstore_preference__e;
char* preference_preference_ToString(openapi_petstore_preference__e preference);
openapi_petstore_preference__e preference_preference_FromString(char* preference);
cJSON *preference_convertToJSON(openapi_petstore_preference__e preference);
openapi_petstore_preference__e preference_parseFromJSON(cJSON *preferenceJSON);
#endif /* _preference_H_ */