William Cheng 7c67f731bc
Rename csharp-netcore to csharp (#15903)
* rename csharp-netcore to csharp

* rename file

* renmae modules/openapi-generator/src/main/resources/csharp-netcore

* update samples

* mv dir

* update samples

* rename csharp-netcore to csharp in appveyor.yml

* update doc
2023-06-25 11:08:59 +08:00

3.2 KiB

Org.OpenAPITools.Api.AnotherFakeApi

All URIs are relative to http://petstore.swagger.io:80/v2

Method HTTP request Description
Call123TestSpecialTags PATCH /another-fake/dummy To test special tags

Call123TestSpecialTags

ModelClient Call123TestSpecialTags (ModelClient modelClient)

To test special tags

To test special tags and operation ID starting with number

Example

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

namespace Example
{
    public class Call123TestSpecialTagsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://petstore.swagger.io:80/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new AnotherFakeApi(httpClient, config, httpClientHandler);
            var modelClient = new ModelClient(); // ModelClient | client model

            try
            {
                // To test special tags
                ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the Call123TestSpecialTagsWithHttpInfo variant

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

try
{
    // To test special tags
    ApiResponse<ModelClient> response = apiInstance.Call123TestSpecialTagsWithHttpInfo(modelClient);
    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 AnotherFakeApi.Call123TestSpecialTagsWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
modelClient ModelClient client model

Return type

ModelClient

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -

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