* [CsharpNetStandard] Added C# .NET Standard Client Generation Added language CsharpNetStandard. Everything copied from csharp Client Generator. Dependancies switched from Restsharp to Restsharp.Portable. Changes made where nececary to replicate Restsharp functionallity. Project type changed to .NET Standard protable library. * [CsharpNetStandard] Removed client prop validation due to incompability * [CsharpNetStandard] Minor fixes Changed leftover RestSharp.Method to Method Changed to .Net Standard 1.3 for compability reasons Changed excludeTests to default to true due to tests not being implemented yet Removed unnecessary targetFramework property Removed leftover UWP stuff * [CsharpNetStandard] More fixes Added correct dependencies to Readme Added correct supported frameworks to Readme Added slightly better placeholder for installation instructions in Readme Removed leftover dependencies from project.json Removed leftover SupportsAsync stuff Removed references to build.bat/-.sh since they're not yet being generated Todo implement test generation * [CsharpNetStandard] Added forgoten git_push.sh * [C#-netstandard] Renamed option to csharp-netstandard Also added .bat file for test generation * [C# Net Standard] fixed path in .bat file * [C# NET Standard] fixes to enum generation Fixed issues with enum generation due to tired programmer * [C# NET Standard] Generated sample client library Sample library generated Fixes: Class actually works again .bat - minor inconsistency fixed * [C# NET Standard] Error corrected in how timeout is set Configuration Timeout property changed to TimeSpan type and code corrected around that * [C#] Merged .NET Standard generator into csharp generator Functionallity of csharp-netstarndard generator has been moved into standard csharp generator under the targetFramework option as "v5.0"
9.0 KiB
IO.Swagger.Api.FakeApi
All URIs are relative to http://petstore.swagger.io/v2
Method | HTTP request | Description |
---|---|---|
TestClientModel | PATCH /fake | To test "client" model |
TestEndpointParameters | POST /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 |
TestEnumParameters | GET /fake | To test enum parameters |
TestClientModel
ModelClient TestClientModel (ModelClient body)
To test "client" model
To test "client" model
Example
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class TestClientModelExample
{
public void main()
{
var apiInstance = new FakeApi();
var body = new ModelClient(); // ModelClient | client model
try
{
// To test \"client\" model
ModelClient result = apiInstance.TestClientModel(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | ModelClient | client model |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TestEndpointParameters
void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Example
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()
{
// Configure HTTP basic authorization: http_basic_test
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
var apiInstance = new FakeApi();
var number = 3.4; // decimal? | None
var _double = 1.2; // double? | None
var patternWithoutDelimiter = patternWithoutDelimiter_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 _string = _string_example; // string | 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)
var callback = callback_example; // string | None (optional)
try
{
// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback);
}
catch (Exception e)
{
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
number | decimal? | None | |
_double | double? | None | |
patternWithoutDelimiter | string | None | |
_byte | byte[] | None | |
integer | int? | None | [optional] |
int32 | int? | None | [optional] |
int64 | long? | None | [optional] |
_float | float? | None | [optional] |
_string | string | None | [optional] |
binary | byte[] | None | [optional] |
date | DateTime? | None | [optional] |
dateTime | DateTime? | None | [optional] |
password | string | None | [optional] |
callback | string | None | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/xml; charset=utf-8, application/json; charset=utf-8
- Accept: application/xml; charset=utf-8, application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TestEnumParameters
void TestEnumParameters (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null)
To test enum parameters
To test enum parameters
Example
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class TestEnumParametersExample
{
public void main()
{
var apiInstance = new FakeApi();
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional)
var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg)
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
var enumQueryStringArray = new List<string>(); // List<string> | Query parameter enum test (string array) (optional)
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional)
try
{
// To test enum parameters
apiInstance.TestEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
}
catch (Exception e)
{
Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message );
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
enumFormStringArray | List<string> | Form parameter enum test (string array) | [optional] |
enumFormString | string | Form parameter enum test (string) | [optional] [default to -efg] |
enumHeaderStringArray | List<string> | Header parameter enum test (string array) | [optional] |
enumHeaderString | string | Header parameter enum test (string) | [optional] [default to -efg] |
enumQueryStringArray | List<string> | Query parameter enum test (string array) | [optional] |
enumQueryString | string | Query parameter enum test (string) | [optional] [default to -efg] |
enumQueryInteger | int? | Query parameter enum test (double) | [optional] |
enumQueryDouble | double? | Query parameter enum test (double) | [optional] |
Return type
void (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: /
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]