Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ namespace {{packageName}}.Test.{{apiPackage}}
{{#allParams}}
{{^required}}Client.Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} = default{{nrt!}};
{{/allParams}}
{{#returnType}}
{{#responses}}
{{#-first}}
{{#dataType}}
var response = await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
var model = response.{{#lambda.first}}{{#responses}}{{vendorExtensions.x-http-status}} {{/responses}}{{/lambda.first}}();
var model = response.{{vendorExtensions.x-http-status}}();
Assert.IsType<{{{.}}}>(model);
{{/returnType}}
{{^returnType}}
{{/dataType}}
{{^dataType}}
await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
{{/returnType}}
{{/dataType}}
{{/-first}}
{{/responses}}
}
{{/operation}}
{{/operations}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,19 @@ paths:
- api_key_query: []
requestBody:
$ref: '#/components/requestBodies/Client'
/redirectOrDefault:
get:
operationId: redirectOrDefault
responses:
'301':
description: redirect
# response that does not provide any content
default:
description: default
content:
application/json:
schema:
$ref: '#/components/schemas/Bar'
/fake:
patch:
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,18 @@ paths:
summary: To test class name in snake case
tags:
- fake_classname_tags 123#$%^
/redirectOrDefault:
get:
operationId: redirectOrDefault
responses:
"301":
description: redirect
default:
content:
application/json:
schema:
$ref: "#/components/schemas/Bar"
description: default
/fake:
delete:
description: Fake endpoint to test group parameters (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RedirectOrDefault**](DefaultApi.md#redirectordefault) | **GET** /redirectOrDefault | |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
| [**Test**](DefaultApi.md#test) | **GET** /test | Retrieve an existing Notificationtest&#39;s Elements |

Expand Down Expand Up @@ -106,6 +107,37 @@ No authorization required

[[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)

<a id="redirectordefault"></a>
# **RedirectOrDefault**
> string RedirectOrDefault ()




### Parameters
This endpoint does not need any parameter.
### Return type

**string**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **301** | redirect | - |
| **0** | default | - |

[[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)

<a id="rolesreportget"></a>
# **RolesReportGet**
> List&lt;List&lt;RolesReportsHash&gt;&gt; RolesReportGet ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ public async Task HelloAsyncTest()
Assert.IsType<List<Guid>>(model);
}

/// <summary>
/// Test RedirectOrDefault
/// </summary>
[Fact (Skip = "not implemented")]
public async Task RedirectOrDefaultAsyncTest()
{
await _instance.RedirectOrDefaultAsync();
}

/// <summary>
/// Test RolesReportGet
/// </summary>
Expand All @@ -90,7 +99,7 @@ public async Task RolesReportGetAsyncTest()
{
var response = await _instance.RolesReportGetAsync();
var model = response.Ok();
Assert.IsType<List<List<RolesReportsHash>>>(model);
Assert.IsType<List<List>>(model);
}

/// <summary>
Expand Down
Loading
Loading