[cpp-restsdk] Generate mockable APIs (#595)

* Port GMock feature from NativeInstruments

swagger-codegen fork:
https://github.com/NativeInstruments/swagger-codegen/pull/9

* Update petstore for Mockable APIs

* Fix shared_ptr in templates for File params

* Add guards in templates for GMock APIs

* Regenerate samples without GMocks

* Add useful constructors for GMock APIs

* Add constructors to API header interface

* Update samples with explicit monadic constructors

* Add default implementations for destructors
This commit is contained in:
Daniel Miller
2018-07-24 00:31:21 -07:00
committed by William Cheng
parent 59d38d7dd2
commit 530065137d
39 changed files with 139 additions and 47 deletions

View File

@@ -4,7 +4,7 @@
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.1.1-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

View File

@@ -4,7 +4,7 @@
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.1.1-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@@ -35,11 +35,16 @@ namespace api {
using namespace org::openapitools::client::model;
class PetApi
class PetApi
{
public:
PetApi( std::shared_ptr<ApiClient> apiClient );
explicit PetApi( std::shared_ptr<ApiClient> apiClient );
virtual ~PetApi();
/// <summary>
/// Add a new pet to the store
/// </summary>

View File

@@ -4,7 +4,7 @@
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.1.1-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

View File

@@ -4,7 +4,7 @@
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.1.1-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@@ -34,11 +34,16 @@ namespace api {
using namespace org::openapitools::client::model;
class StoreApi
class StoreApi
{
public:
StoreApi( std::shared_ptr<ApiClient> apiClient );
explicit StoreApi( std::shared_ptr<ApiClient> apiClient );
virtual ~StoreApi();
/// <summary>
/// Delete purchase order by ID
/// </summary>

View File

@@ -4,7 +4,7 @@
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.1.1-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

View File

@@ -4,7 +4,7 @@
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.1.1-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@@ -34,11 +34,16 @@ namespace api {
using namespace org::openapitools::client::model;
class UserApi
class UserApi
{
public:
UserApi( std::shared_ptr<ApiClient> apiClient );
explicit UserApi( std::shared_ptr<ApiClient> apiClient );
virtual ~UserApi();
/// <summary>
/// Create user
/// </summary>