Anakael 1fbf7220ec
[CS] refactor: update github actions (#17666)
* feat: DateOnly for client

* fix: generated doc for csharp

* doc: fix generators README for csharp

* add DateOnly option for aspnet

* refactor: update csharp docs

* refactor: fix typo

* finish

* finish

* finish

* regenerate

* rebuild and regenerate

* fix build error

* finish

* revert path

* regenerate

* remove exceed samples

* regenerate

* add DateOnly to nullable

* remove obsolete file from list

* update test files list

* remove obsolete sample build

* revert manual tests

* revert samples to master and regenerate

* remove new samples

* remove eol

* remove eol

* add new specs

* try fix test

* update tests

* update files

* remove eol

* revert

* remove eol

* regenerate

* add net6+ support to aspnetcore

* add jobs

* update actions

* regenerate

* delete exceed file

* remove rexeg
2024-02-28 15:56:48 +08:00

3.3 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

Env 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
                Env result = apiInstance.GetParameterNameMapping(UnderscoreType, type, TypeWithUnderscore, httpDebugOption);
                Debug.WriteLine(result);
            }
            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
    ApiResponse<Env> response = apiInstance.GetParameterNameMappingWithHttpInfo(UnderscoreType, type, TypeWithUnderscore, httpDebugOption);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
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

Env

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

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