* fix(c): Remove duplicate code generation for UUID path parameters
The C generator was generating duplicate path parameter handling code
when a parameter had format: uuid. This occurred because UUID parameters
have both isString=true and isUuid=true flags set, causing both the
{{#isString}} and {{#isUuid}} template blocks to execute.
The duplicate {{#isUuid}} block has been removed since it generated
identical code to the {{#isString}} block. This makes UUID parameters
consistent with email parameters, which already work this way
(isEmail=true and isString=true, but only use the {{#isString}} block).
The generated code now compiles successfully without duplicate variable
declarations.
* test(c): Add UUID path parameter test case to petstore
Adds endpoint with UUID path parameter to verify C generator produces compilable code without duplicate variable declarations.
* chore(samples): Regenerate all C samples with template fix
Regenerated all C sample variants to include the UUID path parameter example.
* [C-Curl] Client generator does not handle float properly (#21092)
- Change function signature to float*
- Change generator to convert float to string
- Similar change for double and long
* [C-Curl] Client generator does not handle float properly (#21092)
- Generate samples
- Fix generator for headers and path params
* Revert "[C-Curl] Client generator does not handle float properly (#21092)"
This reverts commit ba044a65d51d427fbccea8e8c0d14c50fab0579b.
* Revert "[C-Curl] Client generator does not handle float properly (#21092)"
This reverts commit f99c5b038276aed511f4e81cc8cec16acc6f085f.
* [C-Curl] Client generator does not handle float properly (#21092)
- Convert float, double and long to string
- Generate samples
* [C-Curl] Client generator does not handle float properly (#21092)
- Add missing yaml example file
* [C-Curl] Client generator does not handle float properly (#21092)
- Transfer float and double in scientific notation with resp. 7 and 16 decimals
- Adapt string size to number of required characters
* [C-Curl] Client generator does not handle float properly (#21092)
- Fix unused variable.
- Fix snprintf string
* * [C-Curl] Client generator does not handle float properly (#21092)
- Generating samples
* * [C-Curl] Client generator does not handle float properly (#21092)
- Always allocate the exact string size
* [C] Deal with binary api parameters
With this change, the bodyParameters array can also be binary, so pass
its length around instead of relying on strlen().
* [C] Fix a few remaining enum issues
* [C] Install headers and include any_type.h header
* [C] Don't require C++ to compile C code
* [C] Test binary bodies and path enums in schemas
* Update samples
---------
Co-authored-by: Sam Bingner <sam@corellium.com>
* [C] Clear the response code from previous api calls
Before making an api call, reset apiClient->response_code to zero. That
will protect us from checking stale values if the curl request fails.
* [C] Check that string arguments are not null
Check early on that the arguments are not null, to prevent crashes on
strdup() calls.
* [C] Don't attempt to fill in a type with error info
Check if the api call returned an error before attempting to parse the
reply as the expected type.
* [C] Handle binary and integer return types
* [C] Update test schemas with binary and integer return types
* Update samples
* [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
* [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