Ernesto Fernández 52b5b8fb76
Fix a few issues with the C generator (part 2) (#20227)
* [C] Don't convert post body strings to JSON

If the body provided for the api request is a just a string itself,
don't try to convert it to JSON, simply submit the string.

* [C] Implement BearerToken authentication

* [C] Handle nullable fields correctly

* [C] Fix implementation of FromString for enums

* [C] Update the test schemas to cover the changes

* Update samples

* Fix the updated samples

* [C] Add the new samples folder to the CI workflow
2024-12-06 01:32:34 +08:00

33 lines
637 B
C

/*
* bit.h
*
* bit value
*/
#ifndef _bit_H_
#define _bit_H_
#include <string.h>
#include "../external/cJSON.h"
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
typedef struct bit_t bit_t;
// Enum for bit
typedef enum { openapi_petstore_bit__NULL = 0, openapi_petstore_bit___0, openapi_petstore_bit___1 } openapi_petstore_bit__e;
char* bit_bit_ToString(openapi_petstore_bit__e bit);
openapi_petstore_bit__e bit_bit_FromString(char* bit);
cJSON *bit_convertToJSON(openapi_petstore_bit__e bit);
openapi_petstore_bit__e bit_parseFromJSON(cJSON *bitJSON);
#endif /* _bit_H_ */