Merge pull request #2754 from wing328/add_uuid_mapping

Add uuid mapping
This commit is contained in:
wing328 2016-05-03 11:13:45 +08:00
commit f2d180f9a8
50 changed files with 1286 additions and 316 deletions

View File

@ -88,7 +88,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
"Int32", "Int32",
"Int64", "Int64",
"Float", "Float",
"Guid", "Guid?",
"System.IO.Stream", // not really a primitive, we include it to avoid model import "System.IO.Stream", // not really a primitive, we include it to avoid model import
"Object") "Object")
); );
@ -115,7 +115,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
typeMapping.put("list", "List"); typeMapping.put("list", "List");
typeMapping.put("map", "Dictionary"); typeMapping.put("map", "Dictionary");
typeMapping.put("object", "Object"); typeMapping.put("object", "Object");
typeMapping.put("uuid", "Guid"); typeMapping.put("uuid", "Guid?");
} }
public void setReturnICollection(boolean returnICollection) { public void setReturnICollection(boolean returnICollection) {

View File

@ -60,6 +60,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
// mapped to String as a workaround // mapped to String as a workaround
typeMapping.put("binary", "string"); typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string"); typeMapping.put("ByteArray", "string");
typeMapping.put("UUID", "string");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase")); cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase"));

View File

@ -89,6 +89,7 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
instantiationTypes.put("map", "HashMap"); instantiationTypes.put("map", "HashMap");
typeMapping.put("date", "Date"); typeMapping.put("date", "Date");
typeMapping.put("file", "File"); typeMapping.put("file", "File");
typeMapping.put("UUID", "String");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC));
cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC));

View File

@ -136,6 +136,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
// binary not supported in JavaScript client right now, using String as a workaround // binary not supported in JavaScript client right now, using String as a workaround
typeMapping.put("ByteArray", "String"); // I don't see ByteArray defined in the Swagger docs. typeMapping.put("ByteArray", "String"); // I don't see ByteArray defined in the Swagger docs.
typeMapping.put("binary", "String"); typeMapping.put("binary", "String");
typeMapping.put("UUID", "String");
importMapping.clear(); importMapping.clear();

View File

@ -111,6 +111,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("object", "object"); typeMapping.put("object", "object");
typeMapping.put("binary", "string"); typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string"); typeMapping.put("ByteArray", "string");
typeMapping.put("UUID", "string");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC));
cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC));

View File

@ -117,6 +117,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("file", "File"); typeMapping.put("file", "File");
typeMapping.put("binary", "String"); typeMapping.put("binary", "String");
typeMapping.put("ByteArray", "String"); typeMapping.put("ByteArray", "String");
typeMapping.put("UUID", "String");
// remove modelPackage and apiPackage added by default // remove modelPackage and apiPackage added by default
Iterator<CliOption> itr = cliOptions.iterator(); Iterator<CliOption> itr = cliOptions.iterator();

View File

@ -139,6 +139,14 @@ namespace IO.Swagger.Test
// TODO: unit test for the property 'DateTime' // TODO: unit test for the property 'DateTime'
} }
/// <summary> /// <summary>
/// Test the property 'Uuid'
/// </summary>
[Test]
public void UuidTest()
{
// TODO: unit test for the property 'Uuid'
}
/// <summary>
/// Test the property 'Password' /// Test the property 'Password'
/// </summary> /// </summary>
[Test] [Test]

View File

@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: 1.0.0 - API version: 1.0.0
- SDK version: 1.0.0 - SDK version: 1.0.0
- Build date: 2016-04-21T17:22:44.115+08:00 - Build date: 2016-05-02T22:02:29.555+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen - Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported ## Frameworks supported
@ -53,20 +53,28 @@ namespace Example
public void main() public void main()
{ {
// Configure OAuth2 access token for authorization: petstore_auth var apiInstance = new FakeApi();
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN'; var number = 3.4; // double? | None
var _double = 1.2; // double? | None
var apiInstance = new PetApi(); var _string = _string_example; // string | None
var body = new Pet(); // Pet | Pet object that needs to be added to the store var _byte = B; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
var _float = 3.4; // float? | None (optional)
var binary = B; // byte[] | None (optional)
var date = 2013-10-20; // DateTime? | None (optional)
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional)
var password = password_example; // string | None (optional)
try try
{ {
// Add a new pet to the store // Fake endpoint for testing various parameters
apiInstance.AddPet(body); apiInstance.TestEndpointParameters(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
} }
} }
} }
@ -79,6 +87,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status

View File

@ -0,0 +1,91 @@
# IO.Swagger.Api.FakeApi
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
# **TestEndpointParameters**
> void TestEndpointParameters (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)
Fake endpoint for testing various parameters
Fake endpoint for testing various parameters
### Example
```csharp
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class TestEndpointParametersExample
{
public void main()
{
var apiInstance = new FakeApi();
var number = 3.4; // double? | None
var _double = 1.2; // double? | None
var _string = _string_example; // string | None
var _byte = B; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
var _float = 3.4; // float? | None (optional)
var binary = B; // byte[] | None (optional)
var date = 2013-10-20; // DateTime? | None (optional)
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional)
var password = password_example; // string | None (optional)
try
{
// Fake endpoint for testing various parameters
apiInstance.TestEndpointParameters(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
catch (Exception e)
{
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
}
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **double?**| None |
**_double** | **double?**| None |
**_string** | **string**| None |
**_byte** | **byte[]**| None |
**integer** | **int?**| None | [optional]
**int32** | **int?**| None | [optional]
**int64** | **long?**| None | [optional]
**_float** | **float?**| None | [optional]
**binary** | **byte[]**| None | [optional]
**date** | **DateTime?**| None | [optional]
**dateTime** | **DateTime?**| None | [optional]
**password** | **string**| None | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -10,11 +10,12 @@ Name | Type | Description | Notes
**_Float** | **float?** | | [optional] **_Float** | **float?** | | [optional]
**_Double** | **double?** | | [optional] **_Double** | **double?** | | [optional]
**_String** | **string** | | [optional] **_String** | **string** | | [optional]
**_Byte** | **byte[]** | | [optional] **_Byte** | **byte[]** | |
**Binary** | **byte[]** | | [optional] **Binary** | **byte[]** | | [optional]
**Date** | **DateTime?** | | [optional] **Date** | **DateTime?** | |
**DateTime** | **DateTime?** | | [optional] **DateTime** | **DateTime?** | | [optional]
**Password** | **string** | | [optional] **Uuid** | **Guid?** | | [optional]
**Password** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3 release_note=$3
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID" git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi fi
if [ "$git_repo_id" = "" ]; then if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID" git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi fi

View File

@ -0,0 +1,418 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using RestSharp;
using IO.Swagger.Client;
namespace IO.Swagger.Api
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IFakeApi
{
#region Synchronous Operations
/// <summary>
/// Fake endpoint for testing various parameters
/// </summary>
/// <remarks>
/// Fake endpoint for testing various parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns></returns>
void TestEndpointParameters (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null);
/// <summary>
/// Fake endpoint for testing various parameters
/// </summary>
/// <remarks>
/// Fake endpoint for testing various parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> TestEndpointParametersWithHttpInfo (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Fake endpoint for testing various parameters
/// </summary>
/// <remarks>
/// Fake endpoint for testing various parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task TestEndpointParametersAsync (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null);
/// <summary>
/// Fake endpoint for testing various parameters
/// </summary>
/// <remarks>
/// Fake endpoint for testing various parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> TestEndpointParametersAsyncWithHttpInfo (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public class FakeApi : IFakeApi
{
/// <summary>
/// Initializes a new instance of the <see cref="FakeApi"/> class.
/// </summary>
/// <returns></returns>
public FakeApi(String basePath)
{
this.Configuration = new Configuration(new ApiClient(basePath));
// ensure API client has configuration ready
if (Configuration.ApiClient.Configuration == null)
{
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="FakeApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
public FakeApi(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
this.Configuration = Configuration.Default;
else
this.Configuration = configuration;
// ensure API client has configuration ready
if (Configuration.ApiClient.Configuration == null)
{
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public String GetBasePath()
{
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
/// <summary>
/// Sets the base path of the API client.
/// </summary>
/// <value>The base path</value>
[Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(String basePath)
{
// do nothing
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
/// <value>An instance of the Configuration</value>
public Configuration Configuration {get; set;}
/// <summary>
/// Gets the default header.
/// </summary>
/// <returns>Dictionary of HTTP header</returns>
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public Dictionary<String, String> DefaultHeader()
{
return this.Configuration.DefaultHeader;
}
/// <summary>
/// Add default header.
/// </summary>
/// <param name="key">Header field name.</param>
/// <param name="value">Header field value.</param>
/// <returns></returns>
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
this.Configuration.AddDefaultHeader(key, value);
}
/// <summary>
/// Fake endpoint for testing various parameters Fake endpoint for testing various parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns></returns>
public void TestEndpointParameters (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)
{
TestEndpointParametersWithHttpInfo(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
/// <summary>
/// Fake endpoint for testing various parameters Fake endpoint for testing various parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> TestEndpointParametersWithHttpInfo (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)
{
// verify the required parameter 'number' is set
if (number == null)
throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_double' is set
if (_double == null)
throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_string' is set
if (_string == null)
throw new ApiException(400, "Missing required parameter '_string' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_byte' is set
if (_byte == null)
throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters");
var localVarPath = "/fake";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (integer != null) localVarFormParams.Add("integer", Configuration.ApiClient.ParameterToString(integer)); // form parameter
if (int32 != null) localVarFormParams.Add("int32", Configuration.ApiClient.ParameterToString(int32)); // form parameter
if (int64 != null) localVarFormParams.Add("int64", Configuration.ApiClient.ParameterToString(int64)); // form parameter
if (number != null) localVarFormParams.Add("number", Configuration.ApiClient.ParameterToString(number)); // form parameter
if (_float != null) localVarFormParams.Add("float", Configuration.ApiClient.ParameterToString(_float)); // form parameter
if (_double != null) localVarFormParams.Add("double", Configuration.ApiClient.ParameterToString(_double)); // form parameter
if (_string != null) localVarFormParams.Add("string", Configuration.ApiClient.ParameterToString(_string)); // form parameter
if (_byte != null) localVarFormParams.Add("byte", Configuration.ApiClient.ParameterToString(_byte)); // form parameter
if (binary != null) localVarFormParams.Add("binary", Configuration.ApiClient.ParameterToString(binary)); // form parameter
if (date != null) localVarFormParams.Add("date", Configuration.ApiClient.ParameterToString(date)); // form parameter
if (dateTime != null) localVarFormParams.Add("dateTime", Configuration.ApiClient.ParameterToString(dateTime)); // form parameter
if (password != null) localVarFormParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // form parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode >= 400)
throw new ApiException (localVarStatusCode, "Error calling TestEndpointParameters: " + localVarResponse.Content, localVarResponse.Content);
else if (localVarStatusCode == 0)
throw new ApiException (localVarStatusCode, "Error calling TestEndpointParameters: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
/// <summary>
/// Fake endpoint for testing various parameters Fake endpoint for testing various parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task TestEndpointParametersAsync (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)
{
await TestEndpointParametersAsyncWithHttpInfo(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
/// <summary>
/// Fake endpoint for testing various parameters Fake endpoint for testing various parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestEndpointParametersAsyncWithHttpInfo (double? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)
{
// verify the required parameter 'number' is set
if (number == null)
throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_double' is set
if (_double == null)
throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_string' is set
if (_string == null)
throw new ApiException(400, "Missing required parameter '_string' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_byte' is set
if (_byte == null)
throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters");
var localVarPath = "/fake";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (integer != null) localVarFormParams.Add("integer", Configuration.ApiClient.ParameterToString(integer)); // form parameter
if (int32 != null) localVarFormParams.Add("int32", Configuration.ApiClient.ParameterToString(int32)); // form parameter
if (int64 != null) localVarFormParams.Add("int64", Configuration.ApiClient.ParameterToString(int64)); // form parameter
if (number != null) localVarFormParams.Add("number", Configuration.ApiClient.ParameterToString(number)); // form parameter
if (_float != null) localVarFormParams.Add("float", Configuration.ApiClient.ParameterToString(_float)); // form parameter
if (_double != null) localVarFormParams.Add("double", Configuration.ApiClient.ParameterToString(_double)); // form parameter
if (_string != null) localVarFormParams.Add("string", Configuration.ApiClient.ParameterToString(_string)); // form parameter
if (_byte != null) localVarFormParams.Add("byte", Configuration.ApiClient.ParameterToString(_byte)); // form parameter
if (binary != null) localVarFormParams.Add("binary", Configuration.ApiClient.ParameterToString(binary)); // form parameter
if (date != null) localVarFormParams.Add("date", Configuration.ApiClient.ParameterToString(date)); // form parameter
if (dateTime != null) localVarFormParams.Add("dateTime", Configuration.ApiClient.ParameterToString(dateTime)); // form parameter
if (password != null) localVarFormParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // form parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode >= 400)
throw new ApiException (localVarStatusCode, "Error calling TestEndpointParameters: " + localVarResponse.Content, localVarResponse.Content);
else if (localVarStatusCode == 0)
throw new ApiException (localVarStatusCode, "Error calling TestEndpointParameters: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
}
}

View File

@ -0,0 +1,175 @@
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model
{
/// <summary>
///
/// </summary>
[DataContract]
public class CatDogTest : Cat, IEquatable<CatDogTest>
{
/// <summary>
/// Initializes a new instance of the <see cref="CatDogTest" /> class.
/// </summary>
public CatDogTest()
{
this.CatDogInteger = 0;
}
/// <summary>
/// Gets or Sets CatId
/// </summary>
[DataMember(Name="cat_id", EmitDefaultValue=false)]
public long? CatId { get; set; }
/// <summary>
/// Gets or Sets DogId
/// </summary>
[DataMember(Name="dog_id", EmitDefaultValue=false)]
public long? DogId { get; set; }
/// <summary>
/// integer property for testing allOf
/// </summary>
/// <value>integer property for testing allOf</value>
[DataMember(Name="CatDogInteger", EmitDefaultValue=false)]
public int? CatDogInteger { get; set; }
/// <summary>
/// Gets or Sets DogName
/// </summary>
[DataMember(Name="dog_name", EmitDefaultValue=false)]
public string DogName { get; set; }
/// <summary>
/// Gets or Sets CatName
/// </summary>
[DataMember(Name="cat_name", EmitDefaultValue=false)]
public string CatName { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class CatDogTest {\n");
sb.Append(" CatId: ").Append(CatId).Append("\n");
sb.Append(" DogId: ").Append(DogId).Append("\n");
sb.Append(" CatDogInteger: ").Append(CatDogInteger).Append("\n");
sb.Append(" DogName: ").Append(DogName).Append("\n");
sb.Append(" CatName: ").Append(CatName).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public new string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as CatDogTest);
}
/// <summary>
/// Returns true if CatDogTest instances are equal
/// </summary>
/// <param name="other">Instance of CatDogTest to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(CatDogTest other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this.CatId == other.CatId ||
this.CatId != null &&
this.CatId.Equals(other.CatId)
) &&
(
this.DogId == other.DogId ||
this.DogId != null &&
this.DogId.Equals(other.DogId)
) &&
(
this.CatDogInteger == other.CatDogInteger ||
this.CatDogInteger != null &&
this.CatDogInteger.Equals(other.CatDogInteger)
) &&
(
this.DogName == other.DogName ||
this.DogName != null &&
this.DogName.Equals(other.DogName)
) &&
(
this.CatName == other.CatName ||
this.CatName != null &&
this.CatName.Equals(other.CatName)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
if (this.CatId != null)
hash = hash * 57 + this.CatId.GetHashCode();
if (this.DogId != null)
hash = hash * 57 + this.DogId.GetHashCode();
if (this.CatDogInteger != null)
hash = hash * 57 + this.CatDogInteger.GetHashCode();
if (this.DogName != null)
hash = hash * 57 + this.DogName.GetHashCode();
if (this.CatName != null)
hash = hash * 57 + this.CatName.GetHashCode();
return hash;
}
}
}
}

View File

@ -29,13 +29,14 @@ namespace IO.Swagger.Model
/// <param name="_Float">_Float.</param> /// <param name="_Float">_Float.</param>
/// <param name="_Double">_Double.</param> /// <param name="_Double">_Double.</param>
/// <param name="_String">_String.</param> /// <param name="_String">_String.</param>
/// <param name="_Byte">_Byte.</param> /// <param name="_Byte">_Byte (required).</param>
/// <param name="Binary">Binary.</param> /// <param name="Binary">Binary.</param>
/// <param name="Date">Date.</param> /// <param name="Date">Date (required).</param>
/// <param name="DateTime">DateTime.</param> /// <param name="DateTime">DateTime.</param>
/// <param name="Password">Password.</param> /// <param name="Uuid">Uuid.</param>
/// <param name="Password">Password (required).</param>
public FormatTest(int? Integer = null, int? Int32 = null, long? Int64 = null, double? Number = null, float? _Float = null, double? _Double = null, string _String = null, byte[] _Byte = null, byte[] Binary = null, DateTime? Date = null, DateTime? DateTime = null, string Password = null) public FormatTest(int? Integer = null, int? Int32 = null, long? Int64 = null, double? Number = null, float? _Float = null, double? _Double = null, string _String = null, byte[] _Byte = null, byte[] Binary = null, DateTime? Date = null, DateTime? DateTime = null, Guid? Uuid = null, string Password = null)
{ {
// to ensure "Number" is required (not null) // to ensure "Number" is required (not null)
if (Number == null) if (Number == null)
@ -46,17 +47,42 @@ namespace IO.Swagger.Model
{ {
this.Number = Number; this.Number = Number;
} }
// to ensure "_Byte" is required (not null)
if (_Byte == null)
{
throw new InvalidDataException("_Byte is a required property for FormatTest and cannot be null");
}
else
{
this._Byte = _Byte;
}
// to ensure "Date" is required (not null)
if (Date == null)
{
throw new InvalidDataException("Date is a required property for FormatTest and cannot be null");
}
else
{
this.Date = Date;
}
// to ensure "Password" is required (not null)
if (Password == null)
{
throw new InvalidDataException("Password is a required property for FormatTest and cannot be null");
}
else
{
this.Password = Password;
}
this.Integer = Integer; this.Integer = Integer;
this.Int32 = Int32; this.Int32 = Int32;
this.Int64 = Int64; this.Int64 = Int64;
this._Float = _Float; this._Float = _Float;
this._Double = _Double; this._Double = _Double;
this._String = _String; this._String = _String;
this._Byte = _Byte;
this.Binary = Binary; this.Binary = Binary;
this.Date = Date;
this.DateTime = DateTime; this.DateTime = DateTime;
this.Password = Password; this.Uuid = Uuid;
} }
@ -127,6 +153,12 @@ namespace IO.Swagger.Model
[DataMember(Name="dateTime", EmitDefaultValue=false)] [DataMember(Name="dateTime", EmitDefaultValue=false)]
public DateTime? DateTime { get; set; } public DateTime? DateTime { get; set; }
/// <summary>
/// Gets or Sets Uuid
/// </summary>
[DataMember(Name="uuid", EmitDefaultValue=false)]
public Guid? Uuid { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Password /// Gets or Sets Password
/// </summary> /// </summary>
@ -152,6 +184,7 @@ namespace IO.Swagger.Model
sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n");
sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
@ -244,6 +277,11 @@ namespace IO.Swagger.Model
this.DateTime != null && this.DateTime != null &&
this.DateTime.Equals(other.DateTime) this.DateTime.Equals(other.DateTime)
) && ) &&
(
this.Uuid == other.Uuid ||
this.Uuid != null &&
this.Uuid.Equals(other.Uuid)
) &&
( (
this.Password == other.Password || this.Password == other.Password ||
this.Password != null && this.Password != null &&
@ -284,6 +322,8 @@ namespace IO.Swagger.Model
hash = hash * 59 + this.Date.GetHashCode(); hash = hash * 59 + this.Date.GetHashCode();
if (this.DateTime != null) if (this.DateTime != null)
hash = hash * 59 + this.DateTime.GetHashCode(); hash = hash * 59 + this.DateTime.GetHashCode();
if (this.Uuid != null)
hash = hash * 59 + this.Uuid.GetHashCode();
if (this.Password != null) if (this.Password != null)
hash = hash * 59 + this.Password.GetHashCode(); hash = hash * 59 + this.Password.GetHashCode();
return hash; return hash;

View File

@ -0,0 +1,143 @@
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model
{
/// <summary>
///
/// </summary>
[DataContract]
public class TagCategoryTest : Category, IEquatable<TagCategoryTest>
{
/// <summary>
/// Initializes a new instance of the <see cref="TagCategoryTest" /> class.
/// </summary>
public TagCategoryTest()
{
this.TagCategoryInteger = 0;
}
/// <summary>
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
/// <summary>
/// integer property for testing allOf
/// </summary>
/// <value>integer property for testing allOf</value>
[DataMember(Name="TagCategoryInteger", EmitDefaultValue=false)]
public int? TagCategoryInteger { get; set; }
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class TagCategoryTest {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" TagCategoryInteger: ").Append(TagCategoryInteger).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public new string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as TagCategoryTest);
}
/// <summary>
/// Returns true if TagCategoryTest instances are equal
/// </summary>
/// <param name="other">Instance of TagCategoryTest to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(TagCategoryTest other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this.Id == other.Id ||
this.Id != null &&
this.Id.Equals(other.Id)
) &&
(
this.TagCategoryInteger == other.TagCategoryInteger ||
this.TagCategoryInteger != null &&
this.TagCategoryInteger.Equals(other.TagCategoryInteger)
) &&
(
this.Name == other.Name ||
this.Name != null &&
this.Name.Equals(other.Name)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
if (this.Id != null)
hash = hash * 57 + this.Id.GetHashCode();
if (this.TagCategoryInteger != null)
hash = hash * 57 + this.TagCategoryInteger.GetHashCode();
if (this.Name != null)
hash = hash * 57 + this.Name.GetHashCode();
return hash;
}
}
}
}

View File

@ -69,8 +69,10 @@
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Animal.cs" /> <Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Animal.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Cat.cs" /> <Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Cat.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Dog.cs" /> <Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Dog.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ApiResponse.cs" /> <Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ApiResponse.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\CatDogTest.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\TagCategoryTest.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup> <ItemGroup>

View File

@ -1,28 +1,12 @@
<Properties StartupItem="SwaggerClientTest.csproj"> <Properties StartupItem="SwaggerClientTest.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs"> <MonoDevelop.Ide.Workbench ActiveDocument="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs">
<Files> <Files>
<File FileName="TestPet.cs" Line="29" Column="39" /> <File FileName="TestPet.cs" Line="47" Column="17" />
<File FileName="TestOrder.cs" Line="99" Column="6" /> <File FileName="TestOrder.cs" Line="1" Column="1" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="711" Column="1" /> <File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="1" Column="1" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs" Line="1" Column="1" />
</Files> </Files>
<Pads>
<Pad Id="MonoDevelop.NUnit.TestPad">
<State name="__root__">
<Node name="SwaggerClientTest" expanded="True">
<Node name="SwaggerClientTest" expanded="True">
<Node name="SwaggerClientTest" expanded="True">
<Node name="TestPet" expanded="True">
<Node name="TestPet" expanded="True">
<Node name="TestGetPetByIdAsyncWithHttpInfo" selected="True" />
</Node>
</Node>
</Node>
</Node>
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench> </MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints> <MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore /> <BreakpointStore />

View File

@ -1,9 +1,9 @@
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll /Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb

View File

@ -0,0 +1,75 @@
# FakeApi
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters
<a name="testEndpointParameters"></a>
# **testEndpointParameters**
> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
Fake endpoint for testing various parameters
Fake endpoint for testing various parameters
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeApi;
FakeApi apiInstance = new FakeApi();
BigDecimal number = new BigDecimal(); // BigDecimal | None
Double _double = 3.4D; // Double | None
String string = "string_example"; // String | None
byte[] _byte = B; // byte[] | None
Integer integer = 56; // Integer | None
Integer int32 = 56; // Integer | None
Long int64 = 789L; // Long | None
Float _float = 3.4F; // Float | None
byte[] binary = B; // byte[] | None
Date date = new Date(); // Date | None
Date dateTime = new Date(); // Date | None
String password = "password_example"; // String | None
try {
apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEndpointParameters");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **BigDecimal**| None |
**_double** | **Double**| None |
**string** | **String**| None |
**_byte** | **byte[]**| None |
**integer** | **Integer**| None | [optional]
**int32** | **Integer**| None | [optional]
**int64** | **Long**| None | [optional]
**_float** | **Float**| None | [optional]
**binary** | **byte[]**| None | [optional]
**date** | **Date**| None | [optional]
**dateTime** | **Date**| None | [optional]
**password** | **String**| None | [optional]
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json

View File

@ -11,11 +11,12 @@ Name | Type | Description | Notes
**_float** | **Float** | | [optional] **_float** | **Float** | | [optional]
**_double** | **Double** | | [optional] **_double** | **Double** | | [optional]
**string** | **String** | | [optional] **string** | **String** | | [optional]
**_byte** | **byte[]** | | [optional] **_byte** | **byte[]** | |
**binary** | **byte[]** | | [optional] **binary** | **byte[]** | | [optional]
**date** | [**Date**](Date.md) | | [optional] **date** | [**Date**](Date.md) | |
**dateTime** | [**Date**](Date.md) | | [optional] **dateTime** | [**Date**](Date.md) | | [optional]
**password** | **String** | | [optional] **uuid** | **String** | | [optional]
**password** | **String** | |

View File

@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3 release_note=$3
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID" git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi fi
if [ "$git_repo_id" = "" ]; then if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID" git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi fi

View File

@ -0,0 +1,128 @@
package io.swagger.client.api;
import com.sun.jersey.api.client.GenericType;
import io.swagger.client.ApiException;
import io.swagger.client.ApiClient;
import io.swagger.client.Configuration;
import io.swagger.client.Pair;
import java.util.Date;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FakeApi {
private ApiClient apiClient;
public FakeApi() {
this(Configuration.getDefaultApiClient());
}
public FakeApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Fake endpoint for testing various parameters
* Fake endpoint for testing various parameters
* @param number None (required)
* @param _double None (required)
* @param string None (required)
* @param _byte None (required)
* @param integer None (optional)
* @param int32 None (optional)
* @param int64 None (optional)
* @param _float None (optional)
* @param binary None (optional)
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @throws ApiException if fails to make API call
*/
public void testEndpointParameters(BigDecimal number, Double _double, String string, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, byte[] binary, Date date, Date dateTime, String password) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'number' is set
if (number == null) {
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
}
// verify the required parameter '_double' is set
if (_double == null) {
throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
}
// verify the required parameter 'string' is set
if (string == null) {
throw new ApiException(400, "Missing the required parameter 'string' when calling testEndpointParameters");
}
// verify the required parameter '_byte' is set
if (_byte == null) {
throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
}
// create path and map variables
String localVarPath = "/fake".replaceAll("\\{format\\}","json");
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (integer != null)
localVarFormParams.put("integer", integer);
if (int32 != null)
localVarFormParams.put("int32", int32);
if (int64 != null)
localVarFormParams.put("int64", int64);
if (number != null)
localVarFormParams.put("number", number);
if (_float != null)
localVarFormParams.put("float", _float);
if (_double != null)
localVarFormParams.put("double", _double);
if (string != null)
localVarFormParams.put("string", string);
if (_byte != null)
localVarFormParams.put("byte", _byte);
if (binary != null)
localVarFormParams.put("binary", binary);
if (date != null)
localVarFormParams.put("date", date);
if (dateTime != null)
localVarFormParams.put("dateTime", dateTime);
if (password != null)
localVarFormParams.put("password", password);
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
}

View File

@ -25,10 +25,13 @@ public class FormatTest {
private byte[] binary = null; private byte[] binary = null;
private Date date = null; private Date date = null;
private Date dateTime = null; private Date dateTime = null;
private String uuid = null;
private String password = null; private String password = null;
/** /**
* minimum: 10.0
* maximum: 100.0
**/ **/
public FormatTest integer(Integer integer) { public FormatTest integer(Integer integer) {
this.integer = integer; this.integer = integer;
@ -46,6 +49,8 @@ public class FormatTest {
/** /**
* minimum: 20.0
* maximum: 200.0
**/ **/
public FormatTest int32(Integer int32) { public FormatTest int32(Integer int32) {
this.int32 = int32; this.int32 = int32;
@ -80,6 +85,8 @@ public class FormatTest {
/** /**
* minimum: 32.1
* maximum: 543.2
**/ **/
public FormatTest number(BigDecimal number) { public FormatTest number(BigDecimal number) {
this.number = number; this.number = number;
@ -97,6 +104,8 @@ public class FormatTest {
/** /**
* minimum: 54.3
* maximum: 987.6
**/ **/
public FormatTest _float(Float _float) { public FormatTest _float(Float _float) {
this._float = _float; this._float = _float;
@ -114,6 +123,8 @@ public class FormatTest {
/** /**
* minimum: 67.8
* maximum: 123.4
**/ **/
public FormatTest _double(Double _double) { public FormatTest _double(Double _double) {
this._double = _double; this._double = _double;
@ -154,7 +165,7 @@ public class FormatTest {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("byte") @JsonProperty("byte")
public byte[] getByte() { public byte[] getByte() {
return _byte; return _byte;
@ -188,7 +199,7 @@ public class FormatTest {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("date") @JsonProperty("date")
public Date getDate() { public Date getDate() {
return date; return date;
@ -215,6 +226,23 @@ public class FormatTest {
} }
/**
**/
public FormatTest uuid(String uuid) {
this.uuid = uuid;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("uuid")
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
/** /**
**/ **/
public FormatTest password(String password) { public FormatTest password(String password) {
@ -222,7 +250,7 @@ public class FormatTest {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("password") @JsonProperty("password")
public String getPassword() { public String getPassword() {
return password; return password;
@ -252,12 +280,13 @@ public class FormatTest {
Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) && Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password); Objects.equals(this.password, formatTest.password);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password); return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password);
} }
@Override @Override
@ -276,6 +305,7 @@ public class FormatTest {
sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();

View File

@ -6,7 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
- API version: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-05-01T12:06:44.623+08:00 - Build date: 2016-05-02T22:07:48.077+08:00
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen - Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
## Installation ## Installation

View File

@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git
- API version: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-04-29T03:01:58.276Z - Build date: 2016-05-02T21:49:03.153+08:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen - Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements ## Requirements
@ -22,11 +22,11 @@ To install the bindings via [Composer](http://getcomposer.org/), add the followi
"repositories": [ "repositories": [
{ {
"type": "git", "type": "git",
"url": "https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git" "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
} }
], ],
"require": { "require": {
"YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID": "*@dev" "GIT_USER_ID/GIT_REPO_ID": "*@dev"
} }
} }
``` ```
@ -59,7 +59,7 @@ Please follow the [installation procedure](#installation--usage) and then run th
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FakeApi(); $api_instance = new Swagger\Client\Api\FakeApi();
$number = "number_example"; // string | None $number = 3.4; // float | None
$double = 1.2; // double | None $double = 1.2; // double | None
$string = "string_example"; // string | None $string = "string_example"; // string | None
$byte = "B"; // string | None $byte = "B"; // string | None

View File

@ -1,5 +1,5 @@
{ {
"name": "YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID", "name": "GIT_USER_ID/GIT_REPO_ID",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"keywords": [ "keywords": [

View File

@ -20,7 +20,7 @@ Fake endpoint for testing various parameters
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FakeApi(); $api_instance = new Swagger\Client\Api\FakeApi();
$number = "number_example"; // string | None $number = 3.4; // float | None
$double = 1.2; // double | None $double = 1.2; // double | None
$string = "string_example"; // string | None $string = "string_example"; // string | None
$byte = "B"; // string | None $byte = "B"; // string | None
@ -45,7 +45,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**number** | **string**| None | **number** | **float**| None |
**double** | **double**| None | **double** | **double**| None |
**string** | **string**| None | **string** | **string**| None |
**byte** | **string**| None | **byte** | **string**| None |

View File

@ -14,6 +14,7 @@ Name | Type | Description | Notes
**binary** | **string** | | [optional] **binary** | **string** | | [optional]
**date** | [**\DateTime**](Date.md) | | **date** | [**\DateTime**](Date.md) | |
**date_time** | [**\DateTime**](\DateTime.md) | | [optional] **date_time** | [**\DateTime**](\DateTime.md) | | [optional]
**uuid** | **string** | | [optional]
**password** | **string** | | **password** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3 release_note=$3
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID" git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi fi
if [ "$git_repo_id" = "" ]; then if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID" git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi fi

View File

@ -95,7 +95,7 @@ class FakeApi
* *
* Fake endpoint for testing various parameters * Fake endpoint for testing various parameters
* *
* @param string $number None (required) * @param float $number None (required)
* @param double $double None (required) * @param double $double None (required)
* @param string $string None (required) * @param string $string None (required)
* @param string $byte None (required) * @param string $byte None (required)
@ -122,7 +122,7 @@ class FakeApi
* *
* Fake endpoint for testing various parameters * Fake endpoint for testing various parameters
* *
* @param string $number None (required) * @param float $number None (required)
* @param double $double None (required) * @param double $double None (required)
* @param string $string None (required) * @param string $string None (required)
* @param string $byte None (required) * @param string $byte None (required)

View File

@ -68,6 +68,7 @@ class FormatTest implements ArrayAccess
'binary' => 'string', 'binary' => 'string',
'date' => '\DateTime', 'date' => '\DateTime',
'date_time' => '\DateTime', 'date_time' => '\DateTime',
'uuid' => 'string',
'password' => 'string' 'password' => 'string'
); );
@ -91,6 +92,7 @@ class FormatTest implements ArrayAccess
'binary' => 'binary', 'binary' => 'binary',
'date' => 'date', 'date' => 'date',
'date_time' => 'dateTime', 'date_time' => 'dateTime',
'uuid' => 'uuid',
'password' => 'password' 'password' => 'password'
); );
@ -114,6 +116,7 @@ class FormatTest implements ArrayAccess
'binary' => 'setBinary', 'binary' => 'setBinary',
'date' => 'setDate', 'date' => 'setDate',
'date_time' => 'setDateTime', 'date_time' => 'setDateTime',
'uuid' => 'setUuid',
'password' => 'setPassword' 'password' => 'setPassword'
); );
@ -137,6 +140,7 @@ class FormatTest implements ArrayAccess
'binary' => 'getBinary', 'binary' => 'getBinary',
'date' => 'getDate', 'date' => 'getDate',
'date_time' => 'getDateTime', 'date_time' => 'getDateTime',
'uuid' => 'getUuid',
'password' => 'getPassword' 'password' => 'getPassword'
); );
@ -199,6 +203,11 @@ class FormatTest implements ArrayAccess
* @var \DateTime * @var \DateTime
*/ */
protected $date_time; protected $date_time;
/**
* $uuid
* @var string
*/
protected $uuid;
/** /**
* $password * $password
* @var string * @var string
@ -225,6 +234,7 @@ class FormatTest implements ArrayAccess
$this->binary = $data["binary"]; $this->binary = $data["binary"];
$this->date = $data["date"]; $this->date = $data["date"];
$this->date_time = $data["date_time"]; $this->date_time = $data["date_time"];
$this->uuid = $data["uuid"];
$this->password = $data["password"]; $this->password = $data["password"];
} }
} }
@ -448,6 +458,26 @@ class FormatTest implements ArrayAccess
$this->date_time = $date_time; $this->date_time = $date_time;
return $this; return $this;
} }
/**
* Gets uuid
* @return string
*/
public function getUuid()
{
return $this->uuid;
}
/**
* Sets uuid
* @param string $uuid
* @return $this
*/
public function setUuid($uuid)
{
$this->uuid = $uuid;
return $this;
}
/** /**
* Gets password * Gets password
* @return string * @return string

View File

@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
- API version: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-04-29T11:03:36.514+08:00 - Build date: 2016-05-02T21:47:16.723+08:00
- Build package: class io.swagger.codegen.languages.RubyClientCodegen - Build package: class io.swagger.codegen.languages.RubyClientCodegen
## Installation ## Installation
@ -36,9 +36,9 @@ Finally add this to the Gemfile:
### Install from Git ### Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID, then add the following in the Gemfile: If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'petstore', :git => 'https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git' gem 'petstore', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
### Include the Ruby code directly ### Include the Ruby code directly

View File

@ -0,0 +1,8 @@
# Petstore::200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional]

View File

@ -14,7 +14,7 @@ Name | Type | Description | Notes
**binary** | **String** | | [optional] **binary** | **String** | | [optional]
**date** | **Date** | | **date** | **Date** | |
**date_time** | **DateTime** | | [optional] **date_time** | **DateTime** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional] **uuid** | **String** | | [optional]
**password** | **String** | | **password** | **String** | |

View File

@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3 release_note=$3
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID" git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi fi
if [ "$git_repo_id" = "" ]; then if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID" git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi fi

View File

@ -77,7 +77,7 @@ module Petstore
:'binary' => :'String', :'binary' => :'String',
:'date' => :'Date', :'date' => :'Date',
:'date_time' => :'DateTime', :'date_time' => :'DateTime',
:'uuid' => :'UUID', :'uuid' => :'String',
:'password' => :'String' :'password' => :'String'
} }
end end

View File

@ -69,7 +69,7 @@ describe 'StoreApi' do
# unit tests for get_order_by_id # unit tests for get_order_by_id
# Find purchase order by ID # Find purchase order by ID
# For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions # For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
# @param order_id ID of pet that needs to be fetched # @param order_id ID of pet that needs to be fetched
# @param [Hash] opts the optional parameters # @param [Hash] opts the optional parameters
# @return [Order] # @return [Order]

View File

@ -103,7 +103,7 @@ describe 'UserApi' do
# unit tests for get_user_by_name # unit tests for get_user_by_name
# Get user by user name # Get user by user name
# #
# @param username The name that needs to be fetched. Use user1 for testing. # @param username The name that needs to be fetched. Use user1 for testing.
# @param [Hash] opts the optional parameters # @param [Hash] opts the optional parameters
# @return [User] # @return [User]
describe 'get_user_by_name test' do describe 'get_user_by_name test' do

View File

@ -36,7 +36,7 @@ describe 'Dog' do
@instance.should be_a(Petstore::Dog) @instance.should be_a(Petstore::Dog)
end end
end end
describe 'test attribute "class_name"' do describe 'test attribute "breed"' do
it 'should work' do it 'should work' do
# assertion here # assertion here
# should be_a() # should be_a()
@ -46,7 +46,7 @@ describe 'Dog' do
end end
end end
describe 'test attribute "breed"' do describe 'test attribute "class_name"' do
it 'should work' do it 'should work' do
# assertion here # assertion here
# should be_a() # should be_a()

View File

@ -146,6 +146,16 @@ describe 'FormatTest' do
end end
end end
describe 'test attribute "uuid"' do
it 'should work' do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
describe 'test attribute "password"' do describe 'test attribute "password"' do
it 'should work' do it 'should work' do
# assertion here # assertion here

View File

@ -41,36 +41,7 @@ namespace API.Client {
url: localVarPath, url: localVarPath,
json: true, json: true,
data: body, data: body,
params: queryParameters,
params: queryParameters,
headers: headerParams
};
if (extraHttpRequestParams) {
httpRequestParams = this.extendObj(httpRequestParams, extraHttpRequestParams);
}
return this.$http(httpRequestParams);
}
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
* @param body Pet object in the form of byte array
*/
public addPetUsingByteArray (body?: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> {
const localVarPath = this.basePath + '/pet?testing_byte_array=true';
let queryParameters: any = {};
let headerParams: any = this.extendObj({}, this.defaultHeaders);
let httpRequestParams: any = {
method: 'POST',
url: localVarPath,
json: true,
data: body,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -102,9 +73,7 @@ namespace API.Client {
method: 'DELETE', method: 'DELETE',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -116,8 +85,8 @@ namespace API.Client {
} }
/** /**
* Finds Pets by status * Finds Pets by status
* Multiple status values can be provided with comma separated strings * Multiple status values can be provided with comma seperated strings
* @param status Status values that need to be considered for query * @param status Status values that need to be considered for filter
*/ */
public findPetsByStatus (status?: Array<string>, extraHttpRequestParams?: any ) : ng.IHttpPromise<Array<Pet>> { public findPetsByStatus (status?: Array<string>, extraHttpRequestParams?: any ) : ng.IHttpPromise<Array<Pet>> {
const localVarPath = this.basePath + '/pet/findByStatus'; const localVarPath = this.basePath + '/pet/findByStatus';
@ -132,9 +101,7 @@ namespace API.Client {
method: 'GET', method: 'GET',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -162,9 +129,7 @@ namespace API.Client {
method: 'GET', method: 'GET',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -193,71 +158,7 @@ namespace API.Client {
method: 'GET', method: 'GET',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams
};
if (extraHttpRequestParams) {
httpRequestParams = this.extendObj(httpRequestParams, extraHttpRequestParams);
}
return this.$http(httpRequestParams);
}
/**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
*/
public getPetByIdInObject (petId: number, extraHttpRequestParams?: any ) : ng.IHttpPromise<InlineResponse200> {
const localVarPath = this.basePath + '/pet/{petId}?response=inline_arbitrary_object'
.replace('{' + 'petId' + '}', String(petId));
let queryParameters: any = {};
let headerParams: any = this.extendObj({}, this.defaultHeaders);
// verify required parameter 'petId' is set
if (!petId) {
throw new Error('Missing required parameter petId when calling getPetByIdInObject');
}
let httpRequestParams: any = {
method: 'GET',
url: localVarPath,
json: true,
params: queryParameters,
headers: headerParams
};
if (extraHttpRequestParams) {
httpRequestParams = this.extendObj(httpRequestParams, extraHttpRequestParams);
}
return this.$http(httpRequestParams);
}
/**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
*/
public petPetIdtestingByteArraytrueGet (petId: number, extraHttpRequestParams?: any ) : ng.IHttpPromise<string> {
const localVarPath = this.basePath + '/pet/{petId}?testing_byte_array=true'
.replace('{' + 'petId' + '}', String(petId));
let queryParameters: any = {};
let headerParams: any = this.extendObj({}, this.defaultHeaders);
// verify required parameter 'petId' is set
if (!petId) {
throw new Error('Missing required parameter petId when calling petPetIdtestingByteArraytrueGet');
}
let httpRequestParams: any = {
method: 'GET',
url: localVarPath,
json: true,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -282,9 +183,7 @@ namespace API.Client {
url: localVarPath, url: localVarPath,
json: true, json: true,
data: body, data: body,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -323,9 +222,7 @@ namespace API.Client {
method: 'POST', method: 'POST',
url: localVarPath, url: localVarPath,
json: false, json: false,
data: this.$httpParamSerializer(formParams),
data: this.$httpParamSerializer(formParams),
params: queryParameters, params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -365,9 +262,7 @@ namespace API.Client {
method: 'POST', method: 'POST',
url: localVarPath, url: localVarPath,
json: false, json: false,
data: this.$httpParamSerializer(formParams),
data: this.$httpParamSerializer(formParams),
params: queryParameters, params: queryParameters,
headers: headerParams headers: headerParams
}; };

View File

@ -45,39 +45,7 @@ namespace API.Client {
method: 'DELETE', method: 'DELETE',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams
};
if (extraHttpRequestParams) {
httpRequestParams = this.extendObj(httpRequestParams, extraHttpRequestParams);
}
return this.$http(httpRequestParams);
}
/**
* Finds orders by status
* A single status value can be provided as a string
* @param status Status value that needs to be considered for query
*/
public findOrdersByStatus (status?: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<Array<Order>> {
const localVarPath = this.basePath + '/store/findByStatus';
let queryParameters: any = {};
let headerParams: any = this.extendObj({}, this.defaultHeaders);
if (status !== undefined) {
queryParameters['status'] = status;
}
let httpRequestParams: any = {
method: 'GET',
url: localVarPath,
json: true,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -100,34 +68,7 @@ namespace API.Client {
method: 'GET', method: 'GET',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams
};
if (extraHttpRequestParams) {
httpRequestParams = this.extendObj(httpRequestParams, extraHttpRequestParams);
}
return this.$http(httpRequestParams);
}
/**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
* Returns an arbitrary object which is actually a map of status codes to quantities
*/
public getInventoryInObject (extraHttpRequestParams?: any ) : ng.IHttpPromise<any> {
const localVarPath = this.basePath + '/store/inventory?response=arbitrary_object';
let queryParameters: any = {};
let headerParams: any = this.extendObj({}, this.defaultHeaders);
let httpRequestParams: any = {
method: 'GET',
url: localVarPath,
json: true,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -139,7 +80,7 @@ namespace API.Client {
} }
/** /**
* Find purchase order by ID * Find purchase order by ID
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched * @param orderId ID of pet that needs to be fetched
*/ */
public getOrderById (orderId: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<Order> { public getOrderById (orderId: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<Order> {
@ -156,9 +97,7 @@ namespace API.Client {
method: 'GET', method: 'GET',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -183,9 +122,7 @@ namespace API.Client {
url: localVarPath, url: localVarPath,
json: true, json: true,
data: body, data: body,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };

View File

@ -41,9 +41,7 @@ namespace API.Client {
url: localVarPath, url: localVarPath,
json: true, json: true,
data: body, data: body,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -68,9 +66,7 @@ namespace API.Client {
url: localVarPath, url: localVarPath,
json: true, json: true,
data: body, data: body,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -95,9 +91,7 @@ namespace API.Client {
url: localVarPath, url: localVarPath,
json: true, json: true,
data: body, data: body,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -126,9 +120,7 @@ namespace API.Client {
method: 'DELETE', method: 'DELETE',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -141,7 +133,7 @@ namespace API.Client {
/** /**
* Get user by user name * Get user by user name
* *
* @param username The name that needs to be fetched. Use user1 for testing. * @param username The name that needs to be fetched. Use user1 for testing.
*/ */
public getUserByName (username: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<User> { public getUserByName (username: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<User> {
const localVarPath = this.basePath + '/user/{username}' const localVarPath = this.basePath + '/user/{username}'
@ -157,9 +149,7 @@ namespace API.Client {
method: 'GET', method: 'GET',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -192,9 +182,7 @@ namespace API.Client {
method: 'GET', method: 'GET',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -217,9 +205,7 @@ namespace API.Client {
method: 'GET', method: 'GET',
url: localVarPath, url: localVarPath,
json: true, json: true,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };
@ -250,9 +236,7 @@ namespace API.Client {
url: localVarPath, url: localVarPath,
json: true, json: true,
data: body, data: body,
params: queryParameters,
params: queryParameters,
headers: headerParams headers: headerParams
}; };

View File

@ -1,11 +1,6 @@
/// <reference path="Category.ts" /> /// <reference path="Category.ts" />
/// <reference path="InlineResponse200.ts" />
/// <reference path="Model200Response.ts" />
/// <reference path="ModelReturn.ts" />
/// <reference path="Name.ts" />
/// <reference path="Order.ts" /> /// <reference path="Order.ts" />
/// <reference path="Pet.ts" /> /// <reference path="Pet.ts" />
/// <reference path="SpecialModelName.ts" />
/// <reference path="Tag.ts" /> /// <reference path="Tag.ts" />
/// <reference path="User.ts" /> /// <reference path="User.ts" />

View File

@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3 release_note=$3
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID" git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi fi
if [ "$git_repo_id" = "" ]; then if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID" git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi fi

View File

@ -129,8 +129,8 @@ export class PetApi {
protected authentications = { protected authentications = {
'default': <Authentication>new VoidAuth(), 'default': <Authentication>new VoidAuth(),
'petstore_auth': new OAuth(),
'api_key': new ApiKeyAuth('header', 'api_key'), 'api_key': new ApiKeyAuth('header', 'api_key'),
'petstore_auth': new OAuth(),
} }
constructor(basePath?: string); constructor(basePath?: string);
@ -409,10 +409,10 @@ export class PetApi {
json: true, json: true,
} }
this.authentications.petstore_auth.applyToRequest(requestOptions);
this.authentications.api_key.applyToRequest(requestOptions); this.authentications.api_key.applyToRequest(requestOptions);
this.authentications.petstore_auth.applyToRequest(requestOptions);
this.authentications.default.applyToRequest(requestOptions); this.authentications.default.applyToRequest(requestOptions);
if (Object.keys(formParams).length) { if (Object.keys(formParams).length) {
@ -632,8 +632,8 @@ export class StoreApi {
protected authentications = { protected authentications = {
'default': <Authentication>new VoidAuth(), 'default': <Authentication>new VoidAuth(),
'petstore_auth': new OAuth(),
'api_key': new ApiKeyAuth('header', 'api_key'), 'api_key': new ApiKeyAuth('header', 'api_key'),
'petstore_auth': new OAuth(),
} }
constructor(basePath?: string); constructor(basePath?: string);
@ -881,8 +881,8 @@ export class UserApi {
protected authentications = { protected authentications = {
'default': <Authentication>new VoidAuth(), 'default': <Authentication>new VoidAuth(),
'petstore_auth': new OAuth(),
'api_key': new ApiKeyAuth('header', 'api_key'), 'api_key': new ApiKeyAuth('header', 'api_key'),
'petstore_auth': new OAuth(),
} }
constructor(basePath?: string); constructor(basePath?: string);

View File

@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3 release_note=$3
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID" git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi fi
if [ "$git_repo_id" = "" ]; then if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID" git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi fi

View File

@ -129,8 +129,8 @@ export class PetApi {
protected authentications = { protected authentications = {
'default': <Authentication>new VoidAuth(), 'default': <Authentication>new VoidAuth(),
'petstore_auth': new OAuth(),
'api_key': new ApiKeyAuth('header', 'api_key'), 'api_key': new ApiKeyAuth('header', 'api_key'),
'petstore_auth': new OAuth(),
} }
constructor(basePath?: string); constructor(basePath?: string);
@ -409,10 +409,10 @@ export class PetApi {
json: true, json: true,
} }
this.authentications.petstore_auth.applyToRequest(requestOptions);
this.authentications.api_key.applyToRequest(requestOptions); this.authentications.api_key.applyToRequest(requestOptions);
this.authentications.petstore_auth.applyToRequest(requestOptions);
this.authentications.default.applyToRequest(requestOptions); this.authentications.default.applyToRequest(requestOptions);
if (Object.keys(formParams).length) { if (Object.keys(formParams).length) {
@ -632,8 +632,8 @@ export class StoreApi {
protected authentications = { protected authentications = {
'default': <Authentication>new VoidAuth(), 'default': <Authentication>new VoidAuth(),
'petstore_auth': new OAuth(),
'api_key': new ApiKeyAuth('header', 'api_key'), 'api_key': new ApiKeyAuth('header', 'api_key'),
'petstore_auth': new OAuth(),
} }
constructor(basePath?: string); constructor(basePath?: string);
@ -881,8 +881,8 @@ export class UserApi {
protected authentications = { protected authentications = {
'default': <Authentication>new VoidAuth(), 'default': <Authentication>new VoidAuth(),
'petstore_auth': new OAuth(),
'api_key': new ApiKeyAuth('header', 'api_key'), 'api_key': new ApiKeyAuth('header', 'api_key'),
'petstore_auth': new OAuth(),
} }
constructor(basePath?: string); constructor(basePath?: string);

View File

@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3 release_note=$3
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID" git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi fi
if [ "$git_repo_id" = "" ]; then if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID" git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi fi

View File

@ -1,6 +1,6 @@
{ {
"name": "@swagger/angular2-typescript-petstore", "name": "@swagger/angular2-typescript-petstore",
"version": "0.0.1-SNAPSHOT.201604282147", "version": "0.0.1-SNAPSHOT.201605022215",
"description": "NodeJS client for @swagger/angular2-typescript-petstore", "description": "NodeJS client for @swagger/angular2-typescript-petstore",
"main": "api.js", "main": "api.js",
"scripts": { "scripts": {