From 54c794a8d49763bf15b08ac7c14fe874675efa36 Mon Sep 17 00:00:00 2001 From: Hemant Zope <42613258+zhemant@users.noreply.github.com> Date: Fri, 4 Oct 2019 13:10:41 +0200 Subject: [PATCH 1/2] Update build-and-test.bash add check for non autogenerated test file --- samples/client/petstore/c/build-and-test.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/c/build-and-test.bash b/samples/client/petstore/c/build-and-test.bash index 28256027f84d..e10052bb5576 100755 --- a/samples/client/petstore/c/build-and-test.bash +++ b/samples/client/petstore/c/build-and-test.bash @@ -16,6 +16,7 @@ cmake . make -./unit-manual-PetAPI -./unit-manual-UserAPI -./unit-manual-StoreAPI +if [ -f unit-manual-PetAPI ]; then ./unit-manual-PetAPI; fi +if [ -f unit-manual-UserAPI ]; then ./unit-manual-UserAPI; fi +if [ -f unit-manual-StoreAPI ]; then ./unit-manual-StoreAPI; fi + From 83f776585e07b7f7b6b5975130a973bdfe395f21 Mon Sep 17 00:00:00 2001 From: Hemant Zope <42613258+zhemant@users.noreply.github.com> Date: Fri, 4 Oct 2019 14:12:03 +0200 Subject: [PATCH 2/2] Update README.md.mustache Add instructions on how to test petstore sample manual tests. --- .../src/main/resources/C-libcurl/README.md.mustache | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/README.md.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/README.md.mustache index b656b40bb95d..457f7c33b22b 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/README.md.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/README.md.mustache @@ -64,6 +64,8 @@ once compile, you can run it with ``` ./main ``` Note: You dont need to specify includes for models and include folder seperately as they are path linked. You just have to import the api.h file in your code, the include linking will work. +## Test petstore sample +In CMakeLists.txt, uncomment line 67 to 90 inorder to compile and generate the executables for manual tests. Once the tests are generated, execute then with ./{testname} ## Author {{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}