William Cheng 954d41b9aa
[C#] Add property, parameter naming support (#16196)
* add property, parameter naming support to c# generators

* update

* fix workflow

* update test

* update
2023-07-28 09:51:33 +08:00

3.1 KiB

Org.OpenAPITools.Api.FakeApi

All URIs are relative to http://localhost

Method HTTP request Description
GetParameterNameMapping GET /fake/parameter-name-mapping parameter name mapping test

GetParameterNameMapping

void GetParameterNameMapping (long UnderscoreType, string type, string TypeWithUnderscore, string httpDebugOption)

parameter name mapping test

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class GetParameterNameMappingExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost";
            var apiInstance = new FakeApi(config);
            var UnderscoreType = 789L;  // long | _type
            var type = "type_example";  // string | type
            var TypeWithUnderscore = "TypeWithUnderscore_example";  // string | type_
            var httpDebugOption = "httpDebugOption_example";  // string | http debug option (to test parameter naming option)

            try
            {
                // parameter name mapping test
                apiInstance.GetParameterNameMapping(UnderscoreType, type, TypeWithUnderscore, httpDebugOption);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FakeApi.GetParameterNameMapping: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetParameterNameMappingWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // parameter name mapping test
    apiInstance.GetParameterNameMappingWithHttpInfo(UnderscoreType, type, TypeWithUnderscore, httpDebugOption);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FakeApi.GetParameterNameMappingWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
UnderscoreType long _type
type string type
TypeWithUnderscore string type_
httpDebugOption string http debug option (to test parameter naming option)

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]