Skip to content

Commit

Permalink
Update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
eafer committed Dec 16, 2024
1 parent 53f0edc commit 5f412c3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion samples/client/others/c/bearerAuth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration")

option(BUILD_SHARED_LIBS "Build using shared libraries" ON)

Expand All @@ -14,7 +15,7 @@ find_package(OpenSSL)
if (OPENSSL_FOUND)
message (STATUS "OPENSSL found")

set(CMAKE_C_FLAGS "-DOPENSSL")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL")
if(CMAKE_VERSION VERSION_LESS 3.4)
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIRS})
Expand Down
3 changes: 2 additions & 1 deletion samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration")

option(BUILD_SHARED_LIBS "Build using shared libraries" ON)

Expand All @@ -14,7 +15,7 @@ find_package(OpenSSL)
if (OPENSSL_FOUND)
message (STATUS "OPENSSL found")

set(CMAKE_C_FLAGS "-DOPENSSL")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL")
if(CMAKE_VERSION VERSION_LESS 3.4)
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/c-useJsonUnformatted/model/order.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cJSON *order_convertToJSON(order_t *order) {

// order->status
if(order->status != openapi_petstore_order_STATUS_NULL) {
if(cJSON_AddStringToObject(item, "status", statusorder_ToString(order->status)) == NULL)
if(cJSON_AddStringToObject(item, "status", order_status_ToString(order->status)) == NULL)
{
goto fail; //Enum
}
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/c-useJsonUnformatted/model/pet.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ cJSON *pet_convertToJSON(pet_t *pet) {

// pet->status
if(pet->status != openapi_petstore_pet_STATUS_NULL) {
if(cJSON_AddStringToObject(item, "status", statuspet_ToString(pet->status)) == NULL)
if(cJSON_AddStringToObject(item, "status", pet_status_ToString(pet->status)) == NULL)
{
goto fail; //Enum
}
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/c/model/order.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cJSON *order_convertToJSON(order_t *order) {

// order->status
if(order->status != openapi_petstore_order_STATUS_NULL) {
if(cJSON_AddStringToObject(item, "status", statusorder_ToString(order->status)) == NULL)
if(cJSON_AddStringToObject(item, "status", order_status_ToString(order->status)) == NULL)
{
goto fail; //Enum
}
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/c/model/pet.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ cJSON *pet_convertToJSON(pet_t *pet) {

// pet->status
if(pet->status != openapi_petstore_pet_STATUS_NULL) {
if(cJSON_AddStringToObject(item, "status", statuspet_ToString(pet->status)) == NULL)
if(cJSON_AddStringToObject(item, "status", pet_status_ToString(pet->status)) == NULL)
{
goto fail; //Enum
}
Expand Down

0 comments on commit 5f412c3

Please sign in to comment.