[csharp] Fixed operation nested return type (#16314)

* fixed operation nested return type

* more robust fix
This commit is contained in:
devhl-labs
2023-08-14 01:07:36 -04:00
committed by GitHub
parent 83af019603
commit ef9520f989
123 changed files with 8189 additions and 12 deletions

View File

@@ -542,7 +542,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
if (allOf != null) { if (allOf != null) {
for (CodegenProperty property : allOf) { for (CodegenProperty property : allOf) {
property.name = patchPropertyName(model, property.baseType); property.name = patchPropertyName(model, property.baseType);
patchPropertyVendorExtensinos(property); patchPropertyVendorExtensions(property);
} }
} }
@@ -552,7 +552,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
for (CodegenProperty property : anyOf) { for (CodegenProperty property : anyOf) {
property.name = patchPropertyName(model, property.baseType); property.name = patchPropertyName(model, property.baseType);
property.isNullable = true; property.isNullable = true;
patchPropertyVendorExtensinos(property); patchPropertyVendorExtensions(property);
} }
} }
@@ -562,7 +562,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
for (CodegenProperty property : oneOf) { for (CodegenProperty property : oneOf) {
property.name = patchPropertyName(model, property.baseType); property.name = patchPropertyName(model, property.baseType);
property.isNullable = true; property.isNullable = true;
patchPropertyVendorExtensinos(property); patchPropertyVendorExtensions(property);
} }
} }
} }
@@ -637,7 +637,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
return value; return value;
} }
private void patchPropertyVendorExtensinos(CodegenProperty property) { private void patchPropertyVendorExtensions(CodegenProperty property) {
Boolean isValueType = isValueType(property); Boolean isValueType = isValueType(property);
property.vendorExtensions.put("x-is-value-type", isValueType); property.vendorExtensions.put("x-is-value-type", isValueType);
property.vendorExtensions.put("x-is-reference-type", !isValueType); property.vendorExtensions.put("x-is-reference-type", !isValueType);
@@ -657,7 +657,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
property.isPrimitiveType = true; property.isPrimitiveType = true;
} }
patchPropertyVendorExtensinos(property); patchPropertyVendorExtensions(property);
String tmpPropertyName = escapeReservedWord(model, property.name); String tmpPropertyName = escapeReservedWord(model, property.name);
property.name = patchPropertyName(model, property.name); property.name = patchPropertyName(model, property.name);
@@ -741,13 +741,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
// Check return types for collection // Check return types for collection
if (operation.returnType != null) { if (operation.returnType != null) {
String typeMapping;
int namespaceEnd = operation.returnType.lastIndexOf("."); int namespaceEnd = operation.returnType.lastIndexOf(".");
if (namespaceEnd > 0) { String typeMapping = namespaceEnd > 0
typeMapping = operation.returnType.substring(namespaceEnd); ? operation.returnType.substring(namespaceEnd)
} else { : operation.returnType;
typeMapping = operation.returnType;
}
if (this.collectionTypes.contains(typeMapping)) { if (this.collectionTypes.contains(typeMapping)) {
operation.isArray = true; operation.isArray = true;
@@ -895,7 +892,23 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
} }
protected void processOperation(CodegenOperation operation) { protected void processOperation(CodegenOperation operation) {
// default noop String[] nestedTypes = { "List", "Collection", "ICollection", "Dictionary" };
Arrays.stream(nestedTypes).forEach(nestedType -> {
if (operation.returnProperty != null && operation.returnType.contains("<" + nestedType + ">") && operation.returnProperty.items != null) {
String nestedReturnType = operation.returnProperty.items.dataType;
operation.returnType = operation.returnType.replace("<" + nestedType + ">", "<" + nestedReturnType + ">");
operation.returnProperty.dataType = operation.returnType;
operation.returnProperty.datatypeWithEnum = operation.returnType;
}
if (operation.returnProperty != null && operation.returnType.contains(", " + nestedType + ">") && operation.returnProperty.items != null) {
String nestedReturnType = operation.returnProperty.items.dataType;
operation.returnType = operation.returnType.replace(", " + nestedType + ">", ", " + nestedReturnType + ">");
operation.returnProperty.dataType = operation.returnType;
operation.returnProperty.datatypeWithEnum = operation.returnType;
}
});
} }
protected void updateCodegenParameterEnumLegacy(CodegenParameter parameter, CodegenModel model) { protected void updateCodegenParameterEnumLegacy(CodegenParameter parameter, CodegenModel model) {

View File

@@ -17,6 +17,17 @@ tags:
- name: user - name: user
description: Operations about user description: Operations about user
paths: paths:
/roles/report:
get:
responses:
'200':
description: returns report
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/RolesReport'
/hello: /hello:
get: get:
summary: Hello summary: Hello
@@ -1276,6 +1287,23 @@ components:
type: http type: http
scheme: signature scheme: signature
schemas: schemas:
RolesReport:
description: Roles report
type: array
items:
$ref: '#/components/schemas/RolesReportsHash'
RolesReportsHash:
description: Role report Hash
type: object
properties:
role_uuid:
type: string
format: uuid
role:
type: object
properties:
name:
type: string
Foo: Foo:
type: object type: object
properties: properties:

View File

@@ -76,6 +76,8 @@ docs/Quadrilateral.md
docs/QuadrilateralInterface.md docs/QuadrilateralInterface.md
docs/ReadOnlyFirst.md docs/ReadOnlyFirst.md
docs/Return.md docs/Return.md
docs/RolesReportsHash.md
docs/RolesReportsHashRole.md
docs/ScaleneTriangle.md docs/ScaleneTriangle.md
docs/Shape.md docs/Shape.md
docs/ShapeInterface.md docs/ShapeInterface.md
@@ -192,6 +194,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -107,6 +107,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo | *DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
*DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country | *DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country |
*DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello *DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello
*DefaultApi* | [**RolesReportGet**](docs/DefaultApi.md#rolesreportget) | **GET** /roles/report |
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint *FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | *FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
@@ -217,6 +218,8 @@ Class | Method | HTTP request | Description
- [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.Return](docs/Return.md) - [Model.Return](docs/Return.md)
- [Model.RolesReportsHash](docs/RolesReportsHash.md)
- [Model.RolesReportsHashRole](docs/RolesReportsHashRole.md)
- [Model.ScaleneTriangle](docs/ScaleneTriangle.md) - [Model.ScaleneTriangle](docs/ScaleneTriangle.md)
- [Model.Shape](docs/Shape.md) - [Model.Shape](docs/Shape.md)
- [Model.ShapeInterface](docs/ShapeInterface.md) - [Model.ShapeInterface](docs/ShapeInterface.md)

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -259,3 +260,85 @@ 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) [[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 ()
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RolesReportGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new DefaultApi(config);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**RoleUuid** | **Guid** | | [optional]
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,66 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Fact]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,75 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Fact]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Fact]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Fact]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
}
}

View File

@@ -86,6 +86,24 @@ namespace Org.OpenAPITools.Api
/// <param name="operationIndex">Index associated with the operation.</param> /// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;Guid&gt;</returns> /// <returns>ApiResponse of List&lt;Guid&gt;</returns>
ApiResponse<List<Guid>> HelloWithHttpInfo(int operationIndex = 0); ApiResponse<List<Guid>> HelloWithHttpInfo(int operationIndex = 0);
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
List<List<RolesReportsHash>> RolesReportGet(int operationIndex = 0);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo(int operationIndex = 0);
#endregion Synchronous Operations #endregion Synchronous Operations
} }
@@ -166,6 +184,29 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns> /// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations #endregion Asynchronous Operations
} }
@@ -680,5 +721,131 @@ namespace Org.OpenAPITools.Api
return localVarResponse; return localVarResponse;
} }
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public List<List<RolesReportsHash>> RolesReportGet(int operationIndex = 0)
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = RolesReportGetWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo(int operationIndex = 0)
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "DefaultApi.RolesReportGet";
localVarRequestOptions.OperationIndex = operationIndex;
// make the HTTP request
var localVarResponse = this.Client.Get<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public async System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = await RolesReportGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "DefaultApi.RolesReportGet";
localVarRequestOptions.OperationIndex = operationIndex;
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
} }
} }

View File

@@ -0,0 +1,189 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
[DataContract(Name = "RolesReportsHash")]
public partial class RolesReportsHash : IEquatable<RolesReportsHash>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="roleUuid">roleUuid.</param>
/// <param name="role">role.</param>
public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole))
{
this._RoleUuid = roleUuid;
if (this.RoleUuid != null)
{
this._flagRoleUuid = true;
}
this._Role = role;
if (this.Role != null)
{
this._flagRole = true;
}
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[DataMember(Name = "role_uuid", EmitDefaultValue = false)]
public Guid RoleUuid
{
get{ return _RoleUuid;}
set
{
_RoleUuid = value;
_flagRoleUuid = true;
}
}
private Guid _RoleUuid;
private bool _flagRoleUuid;
/// <summary>
/// Returns false as RoleUuid should not be serialized given that it's read-only.
/// </summary>
/// <returns>false (boolean)</returns>
public bool ShouldSerializeRoleUuid()
{
return _flagRoleUuid;
}
/// <summary>
/// Gets or Sets Role
/// </summary>
[DataMember(Name = "role", EmitDefaultValue = false)]
public RolesReportsHashRole Role
{
get{ return _Role;}
set
{
_Role = value;
_flagRole = true;
}
}
private RolesReportsHashRole _Role;
private bool _flagRole;
/// <summary>
/// Returns false as Role should not be serialized given that it's read-only.
/// </summary>
/// <returns>false (boolean)</returns>
public bool ShouldSerializeRole()
{
return _flagRole;
}
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHash).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHash instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHash to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHash input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.RoleUuid != null)
{
hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode();
}
if (this.Role != null)
{
hashCode = (hashCode * 59) + this.Role.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -0,0 +1,154 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// RolesReportsHashRole
/// </summary>
[DataContract(Name = "RolesReportsHash_role")]
public partial class RolesReportsHashRole : IEquatable<RolesReportsHashRole>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHashRole" /> class.
/// </summary>
/// <param name="name">name.</param>
public RolesReportsHashRole(string name = default(string))
{
this._Name = name;
if (this.Name != null)
{
this._flagName = true;
}
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name
{
get{ return _Name;}
set
{
_Name = value;
_flagName = true;
}
}
private string _Name;
private bool _flagName;
/// <summary>
/// Returns false as Name should not be serialized given that it's read-only.
/// </summary>
/// <returns>false (boolean)</returns>
public bool ShouldSerializeName()
{
return _flagName;
}
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHashRole {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHashRole).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHashRole instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHashRole to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHashRole input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -78,6 +78,8 @@ docs/models/Quadrilateral.md
docs/models/QuadrilateralInterface.md docs/models/QuadrilateralInterface.md
docs/models/ReadOnlyFirst.md docs/models/ReadOnlyFirst.md
docs/models/Return.md docs/models/Return.md
docs/models/RolesReportsHash.md
docs/models/RolesReportsHashRole.md
docs/models/ScaleneTriangle.md docs/models/ScaleneTriangle.md
docs/models/Shape.md docs/models/Shape.md
docs/models/ShapeInterface.md docs/models/ShapeInterface.md
@@ -200,6 +202,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -259,3 +260,85 @@ 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) [[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 ()
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RolesReportGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new DefaultApi(config);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
**RoleUuid** | **Guid** | | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

View File

@@ -0,0 +1,65 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Fact]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,74 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Fact]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Fact]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Fact]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
}
}

View File

@@ -99,6 +99,27 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;?&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;?&gt;</returns>
Task<ApiResponse<List<Guid>>?> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<List<Guid>>?> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&lt;List&lt;List&lt;RolesReportsHash&gt;&gt;&gt;&gt;</returns>
Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&gt;List&lt;List&lt;RolesReportsHash&gt;&gt;&gt;?&gt;</returns>
Task<ApiResponse<List<List<RolesReportsHash>>>?> RolesReportGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
} }
/// <summary> /// <summary>
@@ -166,6 +187,26 @@ namespace Org.OpenAPITools.Api
{ {
OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception)); OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception));
} }
/// <summary>
/// The event raised after the server response
/// </summary>
public event EventHandler<ApiResponseEventArgs<List<List<RolesReportsHash>>>>? OnRolesReportGet;
/// <summary>
/// The event raised after an error querying the server
/// </summary>
public event EventHandler<ExceptionEventArgs>? OnErrorRolesReportGet;
internal void ExecuteOnRolesReportGet(ApiResponse<List<List<RolesReportsHash>>> apiResponse)
{
OnRolesReportGet?.Invoke(this, new ApiResponseEventArgs<List<List<RolesReportsHash>>>(apiResponse));
}
internal void ExecuteOnErrorRolesReportGet(Exception exception)
{
OnErrorRolesReportGet?.Invoke(this, new ExceptionEventArgs(exception));
}
} }
/// <summary> /// <summary>
@@ -614,5 +655,120 @@ namespace Org.OpenAPITools.Api
throw; throw;
} }
} }
/// <summary>
/// Processes the server response
/// </summary>
/// <param name="apiResponseLocalVar"></param>
private void AfterRolesReportGetDefaultImplementation(ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar)
{
bool suppressDefaultLog = false;
AfterRolesReportGet(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
/// Processes the server response
/// </summary>
/// <param name="suppressDefaultLog"></param>
/// <param name="apiResponseLocalVar"></param>
partial void AfterRolesReportGet(ref bool suppressDefaultLog, ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar);
/// <summary>
/// Logs exceptions that occur while retrieving the server response
/// </summary>
/// <param name="exception"></param>
/// <param name="pathFormat"></param>
/// <param name="path"></param>
private void OnErrorRolesReportGetDefaultImplementation(Exception exception, string pathFormat, string path)
{
bool suppressDefaultLog = false;
OnErrorRolesReportGet(ref suppressDefaultLog, exception, pathFormat, path);
if (!suppressDefaultLog)
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
/// <summary>
/// A partial method that gives developers a way to provide customized exception handling
/// </summary>
/// <param name="suppressDefaultLog"></param>
/// <param name="exception"></param>
/// <param name="pathFormat"></param>
/// <param name="path"></param>
partial void OnErrorRolesReportGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
/// <summary>
///
/// </summary>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns><see cref="Task"/>&lt;<see cref="ApiResponse{T}"/>&gt; where T : <see cref="List{TValue}"/></returns>
public async Task<ApiResponse<List<List<RolesReportsHash>>>?> RolesReportGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default)
{
try
{
return await RolesReportGetAsync(cancellationToken).ConfigureAwait(false);
}
catch (Exception)
{
return null;
}
}
/// <summary>
///
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns><see cref="Task"/>&lt;<see cref="ApiResponse{T}"/>&gt; where T : <see cref="List{TValue}"/></returns>
public async Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default)
{
UriBuilder uriBuilderLocalVar = new UriBuilder();
try
{
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
{
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/roles/report";
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
string[] acceptLocalVars = new string[] {
"application/json"
};
string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars);
if (acceptLocalVar != null)
httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar));
httpRequestMessageLocalVar.Method = HttpMethod.Get;
DateTime requestedAtLocalVar = DateTime.UtcNow;
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
{
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar = new ApiResponse<List<List<RolesReportsHash>>>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/roles/report", requestedAtLocalVar, _jsonSerializerOptions);
AfterRolesReportGetDefaultImplementation(apiResponseLocalVar);
Events.ExecuteOnRolesReportGet(apiResponseLocalVar);
return apiResponseLocalVar;
}
}
}
catch(Exception e)
{
OnErrorRolesReportGetDefaultImplementation(e, "/roles/report", uriBuilderLocalVar.Path);
Events.ExecuteOnErrorRolesReportGet(e);
throw;
}
}
} }
} }

View File

@@ -114,6 +114,8 @@ namespace Org.OpenAPITools.Client
_jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter()); _jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter());
_jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter()); _jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter());
_jsonOptions.Converters.Add(new ReturnJsonConverter()); _jsonOptions.Converters.Add(new ReturnJsonConverter());
_jsonOptions.Converters.Add(new RolesReportsHashJsonConverter());
_jsonOptions.Converters.Add(new RolesReportsHashRoleJsonConverter());
_jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter());
_jsonOptions.Converters.Add(new ShapeJsonConverter()); _jsonOptions.Converters.Add(new ShapeJsonConverter());
_jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter()); _jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter());

View File

@@ -0,0 +1,184 @@
// <auto-generated>
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
#nullable enable
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.ComponentModel.DataAnnotations;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
public partial class RolesReportsHash : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="role">role</param>
/// <param name="roleUuid">roleUuid</param>
[JsonConstructor]
public RolesReportsHash(RolesReportsHashRole role, Guid roleUuid)
{
Role = role;
RoleUuid = roleUuid;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets Role
/// </summary>
[JsonPropertyName("role")]
public RolesReportsHashRole Role { get; set; }
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[JsonPropertyName("role_uuid")]
public Guid RoleUuid { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
/// <summary>
/// A Json converter for type <see cref="RolesReportsHash" />
/// </summary>
public class RolesReportsHashJsonConverter : JsonConverter<RolesReportsHash>
{
/// <summary>
/// Deserializes json to <see cref="RolesReportsHash" />
/// </summary>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = utf8JsonReader.CurrentDepth;
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
RolesReportsHashRole? role = default;
Guid? roleUuid = default;
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "role":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
role = JsonSerializer.Deserialize<RolesReportsHashRole>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "role_uuid":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
roleUuid = utf8JsonReader.GetGuid();
break;
default:
break;
}
}
}
if (role == null)
throw new ArgumentNullException(nameof(role), "Property is required for class RolesReportsHash.");
if (roleUuid == null)
throw new ArgumentNullException(nameof(roleUuid), "Property is required for class RolesReportsHash.");
return new RolesReportsHash(role, roleUuid.Value);
}
/// <summary>
/// Serializes a <see cref="RolesReportsHash" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHash"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, RolesReportsHash rolesReportsHash, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
WriteProperties(ref writer, rolesReportsHash, jsonSerializerOptions);
writer.WriteEndObject();
}
/// <summary>
/// Serializes the properties of <see cref="RolesReportsHash" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHash"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public void WriteProperties(ref Utf8JsonWriter writer, RolesReportsHash rolesReportsHash, JsonSerializerOptions jsonSerializerOptions)
{
writer.WritePropertyName("role");
JsonSerializer.Serialize(writer, rolesReportsHash.Role, jsonSerializerOptions);
writer.WriteString("role_uuid", rolesReportsHash.RoleUuid);
}
}
}

View File

@@ -0,0 +1,164 @@
// <auto-generated>
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
#nullable enable
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.ComponentModel.DataAnnotations;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// RolesReportsHashRole
/// </summary>
public partial class RolesReportsHashRole : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHashRole" /> class.
/// </summary>
/// <param name="name">name</param>
[JsonConstructor]
public RolesReportsHashRole(string name)
{
Name = name;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets Name
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHashRole {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
/// <summary>
/// A Json converter for type <see cref="RolesReportsHashRole" />
/// </summary>
public class RolesReportsHashRoleJsonConverter : JsonConverter<RolesReportsHashRole>
{
/// <summary>
/// Deserializes json to <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = utf8JsonReader.CurrentDepth;
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string? name = default;
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "name":
name = utf8JsonReader.GetString();
break;
default:
break;
}
}
}
if (name == null)
throw new ArgumentNullException(nameof(name), "Property is required for class RolesReportsHashRole.");
return new RolesReportsHashRole(name);
}
/// <summary>
/// Serializes a <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHashRole"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, RolesReportsHashRole rolesReportsHashRole, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
WriteProperties(ref writer, rolesReportsHashRole, jsonSerializerOptions);
writer.WriteEndObject();
}
/// <summary>
/// Serializes the properties of <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHashRole"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public void WriteProperties(ref Utf8JsonWriter writer, RolesReportsHashRole rolesReportsHashRole, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteString("name", rolesReportsHashRole.Name);
}
}
}

View File

@@ -78,6 +78,8 @@ docs/models/Quadrilateral.md
docs/models/QuadrilateralInterface.md docs/models/QuadrilateralInterface.md
docs/models/ReadOnlyFirst.md docs/models/ReadOnlyFirst.md
docs/models/Return.md docs/models/Return.md
docs/models/RolesReportsHash.md
docs/models/RolesReportsHashRole.md
docs/models/ScaleneTriangle.md docs/models/ScaleneTriangle.md
docs/models/Shape.md docs/models/Shape.md
docs/models/ShapeInterface.md docs/models/ShapeInterface.md
@@ -200,6 +202,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -259,3 +260,85 @@ 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) [[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 ()
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RolesReportGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new DefaultApi(config);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
**RoleUuid** | **Guid** | | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

View File

@@ -0,0 +1,65 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Fact]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,74 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Fact]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Fact]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Fact]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
}
}

View File

@@ -97,6 +97,27 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;&gt;</returns>
Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&lt;List&lt;List&lt;RolesReportsHash&gt;&gt;&gt;&gt;</returns>
Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&gt;List&lt;List&lt;RolesReportsHash&gt;&gt;&gt;&gt;</returns>
Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
} }
/// <summary> /// <summary>
@@ -164,6 +185,26 @@ namespace Org.OpenAPITools.Api
{ {
OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception)); OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception));
} }
/// <summary>
/// The event raised after the server response
/// </summary>
public event EventHandler<ApiResponseEventArgs<List<List<RolesReportsHash>>>> OnRolesReportGet;
/// <summary>
/// The event raised after an error querying the server
/// </summary>
public event EventHandler<ExceptionEventArgs> OnErrorRolesReportGet;
internal void ExecuteOnRolesReportGet(ApiResponse<List<List<RolesReportsHash>>> apiResponse)
{
OnRolesReportGet?.Invoke(this, new ApiResponseEventArgs<List<List<RolesReportsHash>>>(apiResponse));
}
internal void ExecuteOnErrorRolesReportGet(Exception exception)
{
OnErrorRolesReportGet?.Invoke(this, new ExceptionEventArgs(exception));
}
} }
/// <summary> /// <summary>
@@ -612,5 +653,120 @@ namespace Org.OpenAPITools.Api
throw; throw;
} }
} }
/// <summary>
/// Processes the server response
/// </summary>
/// <param name="apiResponseLocalVar"></param>
private void AfterRolesReportGetDefaultImplementation(ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar)
{
bool suppressDefaultLog = false;
AfterRolesReportGet(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
/// Processes the server response
/// </summary>
/// <param name="suppressDefaultLog"></param>
/// <param name="apiResponseLocalVar"></param>
partial void AfterRolesReportGet(ref bool suppressDefaultLog, ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar);
/// <summary>
/// Logs exceptions that occur while retrieving the server response
/// </summary>
/// <param name="exception"></param>
/// <param name="pathFormat"></param>
/// <param name="path"></param>
private void OnErrorRolesReportGetDefaultImplementation(Exception exception, string pathFormat, string path)
{
bool suppressDefaultLog = false;
OnErrorRolesReportGet(ref suppressDefaultLog, exception, pathFormat, path);
if (!suppressDefaultLog)
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
/// <summary>
/// A partial method that gives developers a way to provide customized exception handling
/// </summary>
/// <param name="suppressDefaultLog"></param>
/// <param name="exception"></param>
/// <param name="pathFormat"></param>
/// <param name="path"></param>
partial void OnErrorRolesReportGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
/// <summary>
///
/// </summary>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns><see cref="Task"/>&lt;<see cref="ApiResponse{T}"/>&gt; where T : <see cref="List{TValue}"/></returns>
public async Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default)
{
try
{
return await RolesReportGetAsync(cancellationToken).ConfigureAwait(false);
}
catch (Exception)
{
return null;
}
}
/// <summary>
///
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns><see cref="Task"/>&lt;<see cref="ApiResponse{T}"/>&gt; where T : <see cref="List{TValue}"/></returns>
public async Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default)
{
UriBuilder uriBuilderLocalVar = new UriBuilder();
try
{
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
{
uriBuilderLocalVar.Host = HttpClient.BaseAddress.Host;
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/roles/report";
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
string[] acceptLocalVars = new string[] {
"application/json"
};
string acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars);
if (acceptLocalVar != null)
httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar));
httpRequestMessageLocalVar.Method = HttpMethod.Get;
DateTime requestedAtLocalVar = DateTime.UtcNow;
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
{
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar = new ApiResponse<List<List<RolesReportsHash>>>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/roles/report", requestedAtLocalVar, _jsonSerializerOptions);
AfterRolesReportGetDefaultImplementation(apiResponseLocalVar);
Events.ExecuteOnRolesReportGet(apiResponseLocalVar);
return apiResponseLocalVar;
}
}
}
catch(Exception e)
{
OnErrorRolesReportGetDefaultImplementation(e, "/roles/report", uriBuilderLocalVar.Path);
Events.ExecuteOnErrorRolesReportGet(e);
throw;
}
}
} }
} }

View File

@@ -112,6 +112,8 @@ namespace Org.OpenAPITools.Client
_jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter()); _jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter());
_jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter()); _jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter());
_jsonOptions.Converters.Add(new ReturnJsonConverter()); _jsonOptions.Converters.Add(new ReturnJsonConverter());
_jsonOptions.Converters.Add(new RolesReportsHashJsonConverter());
_jsonOptions.Converters.Add(new RolesReportsHashRoleJsonConverter());
_jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter());
_jsonOptions.Converters.Add(new ShapeJsonConverter()); _jsonOptions.Converters.Add(new ShapeJsonConverter());
_jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter()); _jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter());

View File

@@ -0,0 +1,182 @@
// <auto-generated>
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.ComponentModel.DataAnnotations;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
public partial class RolesReportsHash : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="role">role</param>
/// <param name="roleUuid">roleUuid</param>
[JsonConstructor]
public RolesReportsHash(RolesReportsHashRole role, Guid roleUuid)
{
Role = role;
RoleUuid = roleUuid;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets Role
/// </summary>
[JsonPropertyName("role")]
public RolesReportsHashRole Role { get; set; }
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[JsonPropertyName("role_uuid")]
public Guid RoleUuid { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
/// <summary>
/// A Json converter for type <see cref="RolesReportsHash" />
/// </summary>
public class RolesReportsHashJsonConverter : JsonConverter<RolesReportsHash>
{
/// <summary>
/// Deserializes json to <see cref="RolesReportsHash" />
/// </summary>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = utf8JsonReader.CurrentDepth;
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
RolesReportsHashRole role = default;
Guid? roleUuid = default;
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "role":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
role = JsonSerializer.Deserialize<RolesReportsHashRole>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "role_uuid":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
roleUuid = utf8JsonReader.GetGuid();
break;
default:
break;
}
}
}
if (role == null)
throw new ArgumentNullException(nameof(role), "Property is required for class RolesReportsHash.");
if (roleUuid == null)
throw new ArgumentNullException(nameof(roleUuid), "Property is required for class RolesReportsHash.");
return new RolesReportsHash(role, roleUuid.Value);
}
/// <summary>
/// Serializes a <see cref="RolesReportsHash" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHash"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, RolesReportsHash rolesReportsHash, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
WriteProperties(ref writer, rolesReportsHash, jsonSerializerOptions);
writer.WriteEndObject();
}
/// <summary>
/// Serializes the properties of <see cref="RolesReportsHash" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHash"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public void WriteProperties(ref Utf8JsonWriter writer, RolesReportsHash rolesReportsHash, JsonSerializerOptions jsonSerializerOptions)
{
writer.WritePropertyName("role");
JsonSerializer.Serialize(writer, rolesReportsHash.Role, jsonSerializerOptions);
writer.WriteString("role_uuid", rolesReportsHash.RoleUuid);
}
}
}

View File

@@ -0,0 +1,162 @@
// <auto-generated>
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.ComponentModel.DataAnnotations;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// RolesReportsHashRole
/// </summary>
public partial class RolesReportsHashRole : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHashRole" /> class.
/// </summary>
/// <param name="name">name</param>
[JsonConstructor]
public RolesReportsHashRole(string name)
{
Name = name;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets Name
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHashRole {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
/// <summary>
/// A Json converter for type <see cref="RolesReportsHashRole" />
/// </summary>
public class RolesReportsHashRoleJsonConverter : JsonConverter<RolesReportsHashRole>
{
/// <summary>
/// Deserializes json to <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = utf8JsonReader.CurrentDepth;
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string name = default;
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "name":
name = utf8JsonReader.GetString();
break;
default:
break;
}
}
}
if (name == null)
throw new ArgumentNullException(nameof(name), "Property is required for class RolesReportsHashRole.");
return new RolesReportsHashRole(name);
}
/// <summary>
/// Serializes a <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHashRole"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, RolesReportsHashRole rolesReportsHashRole, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
WriteProperties(ref writer, rolesReportsHashRole, jsonSerializerOptions);
writer.WriteEndObject();
}
/// <summary>
/// Serializes the properties of <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHashRole"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public void WriteProperties(ref Utf8JsonWriter writer, RolesReportsHashRole rolesReportsHashRole, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteString("name", rolesReportsHashRole.Name);
}
}
}

View File

@@ -78,6 +78,8 @@ docs/models/Quadrilateral.md
docs/models/QuadrilateralInterface.md docs/models/QuadrilateralInterface.md
docs/models/ReadOnlyFirst.md docs/models/ReadOnlyFirst.md
docs/models/Return.md docs/models/Return.md
docs/models/RolesReportsHash.md
docs/models/RolesReportsHashRole.md
docs/models/ScaleneTriangle.md docs/models/ScaleneTriangle.md
docs/models/Shape.md docs/models/Shape.md
docs/models/ShapeInterface.md docs/models/ShapeInterface.md
@@ -200,6 +202,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -259,3 +260,85 @@ 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) [[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 ()
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RolesReportGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new DefaultApi(config);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
**RoleUuid** | **Guid** | | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

View File

@@ -0,0 +1,65 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Fact]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,74 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Fact]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Fact]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Fact]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
}
}

View File

@@ -97,6 +97,27 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;&gt;</returns> /// <returns>Task&lt;ApiResponse&gt;List&lt;Guid&gt;&gt;&gt;</returns>
Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default); Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&lt;List&lt;List&lt;RolesReportsHash&gt;&gt;&gt;&gt;</returns>
Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task&lt;ApiResponse&gt;List&lt;List&lt;RolesReportsHash&gt;&gt;&gt;&gt;</returns>
Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
} }
/// <summary> /// <summary>
@@ -164,6 +185,26 @@ namespace Org.OpenAPITools.Api
{ {
OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception)); OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception));
} }
/// <summary>
/// The event raised after the server response
/// </summary>
public event EventHandler<ApiResponseEventArgs<List<List<RolesReportsHash>>>> OnRolesReportGet;
/// <summary>
/// The event raised after an error querying the server
/// </summary>
public event EventHandler<ExceptionEventArgs> OnErrorRolesReportGet;
internal void ExecuteOnRolesReportGet(ApiResponse<List<List<RolesReportsHash>>> apiResponse)
{
OnRolesReportGet?.Invoke(this, new ApiResponseEventArgs<List<List<RolesReportsHash>>>(apiResponse));
}
internal void ExecuteOnErrorRolesReportGet(Exception exception)
{
OnErrorRolesReportGet?.Invoke(this, new ExceptionEventArgs(exception));
}
} }
/// <summary> /// <summary>
@@ -610,5 +651,119 @@ namespace Org.OpenAPITools.Api
throw; throw;
} }
} }
/// <summary>
/// Processes the server response
/// </summary>
/// <param name="apiResponseLocalVar"></param>
private void AfterRolesReportGetDefaultImplementation(ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar)
{
bool suppressDefaultLog = false;
AfterRolesReportGet(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
/// Processes the server response
/// </summary>
/// <param name="suppressDefaultLog"></param>
/// <param name="apiResponseLocalVar"></param>
partial void AfterRolesReportGet(ref bool suppressDefaultLog, ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar);
/// <summary>
/// Logs exceptions that occur while retrieving the server response
/// </summary>
/// <param name="exception"></param>
/// <param name="pathFormat"></param>
/// <param name="path"></param>
private void OnErrorRolesReportGetDefaultImplementation(Exception exception, string pathFormat, string path)
{
bool suppressDefaultLog = false;
OnErrorRolesReportGet(ref suppressDefaultLog, exception, pathFormat, path);
if (!suppressDefaultLog)
Logger.LogError(exception, "An error occurred while sending the request to the server.");
}
/// <summary>
/// A partial method that gives developers a way to provide customized exception handling
/// </summary>
/// <param name="suppressDefaultLog"></param>
/// <param name="exception"></param>
/// <param name="pathFormat"></param>
/// <param name="path"></param>
partial void OnErrorRolesReportGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
/// <summary>
///
/// </summary>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns><see cref="Task"/>&lt;<see cref="ApiResponse{T}"/>&gt; where T : <see cref="List{TValue}"/></returns>
public async Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default)
{
try
{
return await RolesReportGetAsync(cancellationToken).ConfigureAwait(false);
}
catch (Exception)
{
return null;
}
}
/// <summary>
///
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns><see cref="Task"/>&lt;<see cref="ApiResponse{T}"/>&gt; where T : <see cref="List{TValue}"/></returns>
public async Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default)
{
UriBuilder uriBuilderLocalVar = new UriBuilder();
try
{
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
{
uriBuilderLocalVar.Host = HttpClient.BaseAddress.Host;
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/roles/report";
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
string[] acceptLocalVars = new string[] {
"application/json"
};
string acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars);
if (acceptLocalVar != null)
httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar));
httpRequestMessageLocalVar.Method = new HttpMethod("GET");
DateTime requestedAtLocalVar = DateTime.UtcNow;
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
{
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false);
ApiResponse<List<List<RolesReportsHash>>> apiResponseLocalVar = new ApiResponse<List<List<RolesReportsHash>>>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/roles/report", requestedAtLocalVar, _jsonSerializerOptions);
AfterRolesReportGetDefaultImplementation(apiResponseLocalVar);
Events.ExecuteOnRolesReportGet(apiResponseLocalVar);
return apiResponseLocalVar;
}
}
}
catch(Exception e)
{
OnErrorRolesReportGetDefaultImplementation(e, "/roles/report", uriBuilderLocalVar.Path);
Events.ExecuteOnErrorRolesReportGet(e);
throw;
}
}
} }
} }

View File

@@ -112,6 +112,8 @@ namespace Org.OpenAPITools.Client
_jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter()); _jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter());
_jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter()); _jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter());
_jsonOptions.Converters.Add(new ReturnJsonConverter()); _jsonOptions.Converters.Add(new ReturnJsonConverter());
_jsonOptions.Converters.Add(new RolesReportsHashJsonConverter());
_jsonOptions.Converters.Add(new RolesReportsHashRoleJsonConverter());
_jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter());
_jsonOptions.Converters.Add(new ShapeJsonConverter()); _jsonOptions.Converters.Add(new ShapeJsonConverter());
_jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter()); _jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter());

View File

@@ -0,0 +1,182 @@
// <auto-generated>
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.ComponentModel.DataAnnotations;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
public partial class RolesReportsHash : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="role">role</param>
/// <param name="roleUuid">roleUuid</param>
[JsonConstructor]
public RolesReportsHash(RolesReportsHashRole role, Guid roleUuid)
{
Role = role;
RoleUuid = roleUuid;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets Role
/// </summary>
[JsonPropertyName("role")]
public RolesReportsHashRole Role { get; set; }
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[JsonPropertyName("role_uuid")]
public Guid RoleUuid { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
/// <summary>
/// A Json converter for type <see cref="RolesReportsHash" />
/// </summary>
public class RolesReportsHashJsonConverter : JsonConverter<RolesReportsHash>
{
/// <summary>
/// Deserializes json to <see cref="RolesReportsHash" />
/// </summary>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = utf8JsonReader.CurrentDepth;
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
RolesReportsHashRole role = default;
Guid? roleUuid = default;
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "role":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
role = JsonSerializer.Deserialize<RolesReportsHashRole>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "role_uuid":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
roleUuid = utf8JsonReader.GetGuid();
break;
default:
break;
}
}
}
if (role == null)
throw new ArgumentNullException(nameof(role), "Property is required for class RolesReportsHash.");
if (roleUuid == null)
throw new ArgumentNullException(nameof(roleUuid), "Property is required for class RolesReportsHash.");
return new RolesReportsHash(role, roleUuid.Value);
}
/// <summary>
/// Serializes a <see cref="RolesReportsHash" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHash"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, RolesReportsHash rolesReportsHash, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
WriteProperties(ref writer, rolesReportsHash, jsonSerializerOptions);
writer.WriteEndObject();
}
/// <summary>
/// Serializes the properties of <see cref="RolesReportsHash" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHash"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public void WriteProperties(ref Utf8JsonWriter writer, RolesReportsHash rolesReportsHash, JsonSerializerOptions jsonSerializerOptions)
{
writer.WritePropertyName("role");
JsonSerializer.Serialize(writer, rolesReportsHash.Role, jsonSerializerOptions);
writer.WriteString("role_uuid", rolesReportsHash.RoleUuid);
}
}
}

View File

@@ -0,0 +1,162 @@
// <auto-generated>
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.ComponentModel.DataAnnotations;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// RolesReportsHashRole
/// </summary>
public partial class RolesReportsHashRole : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHashRole" /> class.
/// </summary>
/// <param name="name">name</param>
[JsonConstructor]
public RolesReportsHashRole(string name)
{
Name = name;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets Name
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHashRole {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
/// <summary>
/// A Json converter for type <see cref="RolesReportsHashRole" />
/// </summary>
public class RolesReportsHashRoleJsonConverter : JsonConverter<RolesReportsHashRole>
{
/// <summary>
/// Deserializes json to <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = utf8JsonReader.CurrentDepth;
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string name = default;
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "name":
name = utf8JsonReader.GetString();
break;
default:
break;
}
}
}
if (name == null)
throw new ArgumentNullException(nameof(name), "Property is required for class RolesReportsHashRole.");
return new RolesReportsHashRole(name);
}
/// <summary>
/// Serializes a <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHashRole"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, RolesReportsHashRole rolesReportsHashRole, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
WriteProperties(ref writer, rolesReportsHashRole, jsonSerializerOptions);
writer.WriteEndObject();
}
/// <summary>
/// Serializes the properties of <see cref="RolesReportsHashRole" />
/// </summary>
/// <param name="writer"></param>
/// <param name="rolesReportsHashRole"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public void WriteProperties(ref Utf8JsonWriter writer, RolesReportsHashRole rolesReportsHashRole, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteString("name", rolesReportsHashRole.Name);
}
}
}

View File

@@ -76,6 +76,8 @@ docs/Quadrilateral.md
docs/QuadrilateralInterface.md docs/QuadrilateralInterface.md
docs/ReadOnlyFirst.md docs/ReadOnlyFirst.md
docs/Return.md docs/Return.md
docs/RolesReportsHash.md
docs/RolesReportsHashRole.md
docs/ScaleneTriangle.md docs/ScaleneTriangle.md
docs/Shape.md docs/Shape.md
docs/ShapeInterface.md docs/ShapeInterface.md
@@ -189,6 +191,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -132,6 +132,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo | *DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
*DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country | *DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country |
*DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello *DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello
*DefaultApi* | [**RolesReportGet**](docs/DefaultApi.md#rolesreportget) | **GET** /roles/report |
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint *FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | *FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
@@ -242,6 +243,8 @@ Class | Method | HTTP request | Description
- [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.Return](docs/Return.md) - [Model.Return](docs/Return.md)
- [Model.RolesReportsHash](docs/RolesReportsHash.md)
- [Model.RolesReportsHashRole](docs/RolesReportsHashRole.md)
- [Model.ScaleneTriangle](docs/ScaleneTriangle.md) - [Model.ScaleneTriangle](docs/ScaleneTriangle.md)
- [Model.Shape](docs/Shape.md) - [Model.Shape](docs/Shape.md)
- [Model.ShapeInterface](docs/ShapeInterface.md) - [Model.ShapeInterface](docs/ShapeInterface.md)

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -271,3 +272,89 @@ 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) [[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 ()
### Example
```csharp
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 RolesReportGetExample
{
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 DefaultApi(httpClient, config, httpClientHandler);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**RoleUuid** | **Guid** | | [optional]
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,66 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Fact]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,75 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Fact]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Fact]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Fact]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
}
}

View File

@@ -80,6 +80,22 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of List&lt;Guid&gt;</returns> /// <returns>ApiResponse of List&lt;Guid&gt;</returns>
ApiResponse<List<Guid>> HelloWithHttpInfo(); ApiResponse<List<Guid>> HelloWithHttpInfo();
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
List<List<RolesReportsHash>> RolesReportGet();
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo();
#endregion Synchronous Operations #endregion Synchronous Operations
} }
@@ -154,6 +170,27 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns> /// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations #endregion Asynchronous Operations
} }
@@ -682,5 +719,106 @@ namespace Org.OpenAPITools.Api
return localVarResponse; return localVarResponse;
} }
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public List<List<RolesReportsHash>> RolesReportGet()
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = RolesReportGetWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo()
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
// make the HTTP request
var localVarResponse = this.Client.Get<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null) throw _exception;
}
return localVarResponse;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public async System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = await RolesReportGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null) throw _exception;
}
return localVarResponse;
}
} }
} }

View File

@@ -0,0 +1,146 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using FileParameter = Org.OpenAPITools.Client.FileParameter;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
[DataContract(Name = "RolesReportsHash")]
public partial class RolesReportsHash : IEquatable<RolesReportsHash>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="roleUuid">roleUuid.</param>
/// <param name="role">role.</param>
public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole))
{
this.RoleUuid = roleUuid;
this.Role = role;
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[DataMember(Name = "role_uuid", EmitDefaultValue = false)]
public Guid RoleUuid { get; set; }
/// <summary>
/// Gets or Sets Role
/// </summary>
[DataMember(Name = "role", EmitDefaultValue = false)]
public RolesReportsHashRole Role { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHash).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHash instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHash to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHash input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.RoleUuid != null)
{
hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode();
}
if (this.Role != null)
{
hashCode = (hashCode * 59) + this.Role.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -0,0 +1,133 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using FileParameter = Org.OpenAPITools.Client.FileParameter;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// RolesReportsHashRole
/// </summary>
[DataContract(Name = "RolesReportsHash_role")]
public partial class RolesReportsHashRole : IEquatable<RolesReportsHashRole>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHashRole" /> class.
/// </summary>
/// <param name="name">name.</param>
public RolesReportsHashRole(string name = default(string))
{
this.Name = name;
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHashRole {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHashRole).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHashRole instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHashRole to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHashRole input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -76,6 +76,8 @@ docs/Quadrilateral.md
docs/QuadrilateralInterface.md docs/QuadrilateralInterface.md
docs/ReadOnlyFirst.md docs/ReadOnlyFirst.md
docs/Return.md docs/Return.md
docs/RolesReportsHash.md
docs/RolesReportsHashRole.md
docs/ScaleneTriangle.md docs/ScaleneTriangle.md
docs/Shape.md docs/Shape.md
docs/ShapeInterface.md docs/ShapeInterface.md
@@ -192,6 +194,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -119,6 +119,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo | *DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
*DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country | *DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country |
*DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello *DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello
*DefaultApi* | [**RolesReportGet**](docs/DefaultApi.md#rolesreportget) | **GET** /roles/report |
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint *FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | *FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
@@ -229,6 +230,8 @@ Class | Method | HTTP request | Description
- [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.Return](docs/Return.md) - [Model.Return](docs/Return.md)
- [Model.RolesReportsHash](docs/RolesReportsHash.md)
- [Model.RolesReportsHashRole](docs/RolesReportsHashRole.md)
- [Model.ScaleneTriangle](docs/ScaleneTriangle.md) - [Model.ScaleneTriangle](docs/ScaleneTriangle.md)
- [Model.Shape](docs/Shape.md) - [Model.Shape](docs/Shape.md)
- [Model.ShapeInterface](docs/ShapeInterface.md) - [Model.ShapeInterface](docs/ShapeInterface.md)

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -259,3 +260,85 @@ 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) [[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 ()
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RolesReportGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new DefaultApi(config);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**RoleUuid** | **Guid** | | [optional]
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,66 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Fact]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,75 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Fact]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Fact]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Fact]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
}
}

View File

@@ -86,6 +86,24 @@ namespace Org.OpenAPITools.Api
/// <param name="operationIndex">Index associated with the operation.</param> /// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;Guid&gt;</returns> /// <returns>ApiResponse of List&lt;Guid&gt;</returns>
ApiResponse<List<Guid>> HelloWithHttpInfo(int operationIndex = 0); ApiResponse<List<Guid>> HelloWithHttpInfo(int operationIndex = 0);
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
List<List<RolesReportsHash>> RolesReportGet(int operationIndex = 0);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo(int operationIndex = 0);
#endregion Synchronous Operations #endregion Synchronous Operations
} }
@@ -166,6 +184,29 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns> /// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations #endregion Asynchronous Operations
} }
@@ -680,5 +721,131 @@ namespace Org.OpenAPITools.Api
return localVarResponse; return localVarResponse;
} }
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public List<List<RolesReportsHash>> RolesReportGet(int operationIndex = 0)
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = RolesReportGetWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo(int operationIndex = 0)
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "DefaultApi.RolesReportGet";
localVarRequestOptions.OperationIndex = operationIndex;
// make the HTTP request
var localVarResponse = this.Client.Get<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public async System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = await RolesReportGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "DefaultApi.RolesReportGet";
localVarRequestOptions.OperationIndex = operationIndex;
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
} }
} }

View File

@@ -0,0 +1,145 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
[DataContract(Name = "RolesReportsHash")]
public partial class RolesReportsHash : IEquatable<RolesReportsHash>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="roleUuid">roleUuid.</param>
/// <param name="role">role.</param>
public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole))
{
this.RoleUuid = roleUuid;
this.Role = role;
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[DataMember(Name = "role_uuid", EmitDefaultValue = false)]
public Guid RoleUuid { get; set; }
/// <summary>
/// Gets or Sets Role
/// </summary>
[DataMember(Name = "role", EmitDefaultValue = false)]
public RolesReportsHashRole Role { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHash).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHash instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHash to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHash input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.RoleUuid != null)
{
hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode();
}
if (this.Role != null)
{
hashCode = (hashCode * 59) + this.Role.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -0,0 +1,132 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// RolesReportsHashRole
/// </summary>
[DataContract(Name = "RolesReportsHash_role")]
public partial class RolesReportsHashRole : IEquatable<RolesReportsHashRole>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHashRole" /> class.
/// </summary>
/// <param name="name">name.</param>
public RolesReportsHashRole(string name = default(string))
{
this.Name = name;
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHashRole {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHashRole).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHashRole instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHashRole to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHashRole input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -76,6 +76,8 @@ docs/Quadrilateral.md
docs/QuadrilateralInterface.md docs/QuadrilateralInterface.md
docs/ReadOnlyFirst.md docs/ReadOnlyFirst.md
docs/Return.md docs/Return.md
docs/RolesReportsHash.md
docs/RolesReportsHashRole.md
docs/ScaleneTriangle.md docs/ScaleneTriangle.md
docs/Shape.md docs/Shape.md
docs/ShapeInterface.md docs/ShapeInterface.md
@@ -192,6 +194,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -119,6 +119,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo | *DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
*DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country | *DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country |
*DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello *DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello
*DefaultApi* | [**RolesReportGet**](docs/DefaultApi.md#rolesreportget) | **GET** /roles/report |
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint *FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | *FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
@@ -229,6 +230,8 @@ Class | Method | HTTP request | Description
- [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.Return](docs/Return.md) - [Model.Return](docs/Return.md)
- [Model.RolesReportsHash](docs/RolesReportsHash.md)
- [Model.RolesReportsHashRole](docs/RolesReportsHashRole.md)
- [Model.ScaleneTriangle](docs/ScaleneTriangle.md) - [Model.ScaleneTriangle](docs/ScaleneTriangle.md)
- [Model.Shape](docs/Shape.md) - [Model.Shape](docs/Shape.md)
- [Model.ShapeInterface](docs/ShapeInterface.md) - [Model.ShapeInterface](docs/ShapeInterface.md)

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -259,3 +260,85 @@ 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) [[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 ()
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RolesReportGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new DefaultApi(config);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**RoleUuid** | **Guid** | | [optional]
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,66 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Fact]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,75 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Fact]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Fact]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Fact]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
}
}

View File

@@ -86,6 +86,24 @@ namespace Org.OpenAPITools.Api
/// <param name="operationIndex">Index associated with the operation.</param> /// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;Guid&gt;</returns> /// <returns>ApiResponse of List&lt;Guid&gt;</returns>
ApiResponse<List<Guid>> HelloWithHttpInfo(int operationIndex = 0); ApiResponse<List<Guid>> HelloWithHttpInfo(int operationIndex = 0);
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
List<List<RolesReportsHash>> RolesReportGet(int operationIndex = 0);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo(int operationIndex = 0);
#endregion Synchronous Operations #endregion Synchronous Operations
} }
@@ -166,6 +184,29 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns> /// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations #endregion Asynchronous Operations
} }
@@ -680,5 +721,131 @@ namespace Org.OpenAPITools.Api
return localVarResponse; return localVarResponse;
} }
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public List<List<RolesReportsHash>> RolesReportGet(int operationIndex = 0)
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = RolesReportGetWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo(int operationIndex = 0)
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "DefaultApi.RolesReportGet";
localVarRequestOptions.OperationIndex = operationIndex;
// make the HTTP request
var localVarResponse = this.Client.Get<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public async System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = await RolesReportGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "DefaultApi.RolesReportGet";
localVarRequestOptions.OperationIndex = operationIndex;
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
} }
} }

View File

@@ -0,0 +1,145 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
[DataContract(Name = "RolesReportsHash")]
public partial class RolesReportsHash : IEquatable<RolesReportsHash>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="roleUuid">roleUuid.</param>
/// <param name="role">role.</param>
public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole))
{
this.RoleUuid = roleUuid;
this.Role = role;
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[DataMember(Name = "role_uuid", EmitDefaultValue = false)]
public Guid RoleUuid { get; set; }
/// <summary>
/// Gets or Sets Role
/// </summary>
[DataMember(Name = "role", EmitDefaultValue = false)]
public RolesReportsHashRole Role { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHash).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHash instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHash to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHash input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.RoleUuid != null)
{
hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode();
}
if (this.Role != null)
{
hashCode = (hashCode * 59) + this.Role.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -0,0 +1,132 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// RolesReportsHashRole
/// </summary>
[DataContract(Name = "RolesReportsHash_role")]
public partial class RolesReportsHashRole : IEquatable<RolesReportsHashRole>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHashRole" /> class.
/// </summary>
/// <param name="name">name.</param>
public RolesReportsHashRole(string name = default(string))
{
this.Name = name;
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHashRole {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHashRole).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHashRole instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHashRole to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHashRole input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -76,6 +76,8 @@ docs/Quadrilateral.md
docs/QuadrilateralInterface.md docs/QuadrilateralInterface.md
docs/ReadOnlyFirst.md docs/ReadOnlyFirst.md
docs/Return.md docs/Return.md
docs/RolesReportsHash.md
docs/RolesReportsHashRole.md
docs/ScaleneTriangle.md docs/ScaleneTriangle.md
docs/Shape.md docs/Shape.md
docs/ShapeInterface.md docs/ShapeInterface.md
@@ -192,6 +194,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -119,6 +119,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo | *DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
*DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country | *DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country |
*DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello *DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello
*DefaultApi* | [**RolesReportGet**](docs/DefaultApi.md#rolesreportget) | **GET** /roles/report |
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint *FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | *FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
@@ -229,6 +230,8 @@ Class | Method | HTTP request | Description
- [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.Return](docs/Return.md) - [Model.Return](docs/Return.md)
- [Model.RolesReportsHash](docs/RolesReportsHash.md)
- [Model.RolesReportsHashRole](docs/RolesReportsHashRole.md)
- [Model.ScaleneTriangle](docs/ScaleneTriangle.md) - [Model.ScaleneTriangle](docs/ScaleneTriangle.md)
- [Model.Shape](docs/Shape.md) - [Model.Shape](docs/Shape.md)
- [Model.ShapeInterface](docs/ShapeInterface.md) - [Model.ShapeInterface](docs/ShapeInterface.md)

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -259,3 +260,85 @@ 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) [[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 ()
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RolesReportGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new DefaultApi(config);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**RoleUuid** | **Guid** | | [optional]
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,66 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Fact]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,75 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Fact]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Fact]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Fact]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
}
}

View File

@@ -86,6 +86,24 @@ namespace Org.OpenAPITools.Api
/// <param name="operationIndex">Index associated with the operation.</param> /// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;Guid&gt;</returns> /// <returns>ApiResponse of List&lt;Guid&gt;</returns>
ApiResponse<List<Guid>> HelloWithHttpInfo(int operationIndex = 0); ApiResponse<List<Guid>> HelloWithHttpInfo(int operationIndex = 0);
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
List<List<RolesReportsHash>> RolesReportGet(int operationIndex = 0);
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo(int operationIndex = 0);
#endregion Synchronous Operations #endregion Synchronous Operations
} }
@@ -166,6 +184,29 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns> /// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations #endregion Asynchronous Operations
} }
@@ -680,5 +721,131 @@ namespace Org.OpenAPITools.Api
return localVarResponse; return localVarResponse;
} }
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public List<List<RolesReportsHash>> RolesReportGet(int operationIndex = 0)
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = RolesReportGetWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo(int operationIndex = 0)
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "DefaultApi.RolesReportGet";
localVarRequestOptions.OperationIndex = operationIndex;
// make the HTTP request
var localVarResponse = this.Client.Get<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public async System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = await RolesReportGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "DefaultApi.RolesReportGet";
localVarRequestOptions.OperationIndex = operationIndex;
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
} }
} }

View File

@@ -0,0 +1,145 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
[DataContract(Name = "RolesReportsHash")]
public partial class RolesReportsHash : IEquatable<RolesReportsHash>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="roleUuid">roleUuid.</param>
/// <param name="role">role.</param>
public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole))
{
this.RoleUuid = roleUuid;
this.Role = role;
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[DataMember(Name = "role_uuid", EmitDefaultValue = false)]
public Guid RoleUuid { get; set; }
/// <summary>
/// Gets or Sets Role
/// </summary>
[DataMember(Name = "role", EmitDefaultValue = false)]
public RolesReportsHashRole Role { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHash).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHash instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHash to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHash input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.RoleUuid != null)
{
hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode();
}
if (this.Role != null)
{
hashCode = (hashCode * 59) + this.Role.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -0,0 +1,132 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// RolesReportsHashRole
/// </summary>
[DataContract(Name = "RolesReportsHash_role")]
public partial class RolesReportsHashRole : IEquatable<RolesReportsHashRole>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHashRole" /> class.
/// </summary>
/// <param name="name">name.</param>
public RolesReportsHashRole(string name = default(string))
{
this.Name = name;
this.AdditionalProperties = new Dictionary<string, object>();
}
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
/// <summary>
/// Gets or Sets additional properties
/// </summary>
[JsonExtensionData]
public IDictionary<string, object> AdditionalProperties { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHashRole {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input as RolesReportsHashRole).AreEqual;
}
/// <summary>
/// Returns true if RolesReportsHashRole instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHashRole to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHashRole input)
{
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.AdditionalProperties != null)
{
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}

View File

@@ -74,6 +74,8 @@ docs/Quadrilateral.md
docs/QuadrilateralInterface.md docs/QuadrilateralInterface.md
docs/ReadOnlyFirst.md docs/ReadOnlyFirst.md
docs/Return.md docs/Return.md
docs/RolesReportsHash.md
docs/RolesReportsHashRole.md
docs/ScaleneTriangle.md docs/ScaleneTriangle.md
docs/Shape.md docs/Shape.md
docs/ShapeInterface.md docs/ShapeInterface.md
@@ -188,6 +190,8 @@ src/Org.OpenAPITools/Model/Quadrilateral.cs
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
src/Org.OpenAPITools/Model/ScaleneTriangle.cs src/Org.OpenAPITools/Model/ScaleneTriangle.cs
src/Org.OpenAPITools/Model/Shape.cs src/Org.OpenAPITools/Model/Shape.cs
src/Org.OpenAPITools/Model/ShapeInterface.cs src/Org.OpenAPITools/Model/ShapeInterface.cs

View File

@@ -93,6 +93,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | *DefaultApi* | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo |
*DefaultApi* | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | *DefaultApi* | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country |
*DefaultApi* | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello *DefaultApi* | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello
*DefaultApi* | [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report |
*FakeApi* | [**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint *FakeApi* | [**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | *FakeApi* | [**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
@@ -203,6 +204,8 @@ Class | Method | HTTP request | Description
- [Model.QuadrilateralInterface](QuadrilateralInterface.md) - [Model.QuadrilateralInterface](QuadrilateralInterface.md)
- [Model.ReadOnlyFirst](ReadOnlyFirst.md) - [Model.ReadOnlyFirst](ReadOnlyFirst.md)
- [Model.Return](Return.md) - [Model.Return](Return.md)
- [Model.RolesReportsHash](RolesReportsHash.md)
- [Model.RolesReportsHashRole](RolesReportsHashRole.md)
- [Model.ScaleneTriangle](ScaleneTriangle.md) - [Model.ScaleneTriangle](ScaleneTriangle.md)
- [Model.Shape](Shape.md) - [Model.Shape](Shape.md)
- [Model.ShapeInterface](ShapeInterface.md) - [Model.ShapeInterface](ShapeInterface.md)

View File

@@ -41,6 +41,17 @@ tags:
- description: Operations about user - description: Operations about user
name: user name: user
paths: paths:
/roles/report:
get:
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RolesReport'
type: array
description: returns report
/hello: /hello:
get: get:
description: Hello description: Hello
@@ -1181,6 +1192,20 @@ components:
description: Pet object that needs to be added to the store description: Pet object that needs to be added to the store
required: true required: true
schemas: schemas:
RolesReport:
description: Roles report
items:
$ref: '#/components/schemas/RolesReportsHash'
type: array
RolesReportsHash:
description: Role report Hash
properties:
role_uuid:
format: uuid
type: string
role:
$ref: '#/components/schemas/RolesReportsHash_role'
type: object
Foo: Foo:
example: example:
bar: bar bar: bar
@@ -2422,6 +2447,11 @@ components:
required: required:
- country - country
type: object type: object
RolesReportsHash_role:
properties:
name:
type: string
type: object
securitySchemes: securitySchemes:
petstore_auth: petstore_auth:
flows: flows:

View File

@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | | | [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | | | [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello | | [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
<a id="fooget"></a> <a id="fooget"></a>
# **FooGet** # **FooGet**
@@ -259,3 +260,85 @@ 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) [[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 ()
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RolesReportGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new DefaultApi(config);
try
{
List<List<RolesReportsHash>> result = apiInstance.RolesReportGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the RolesReportGetWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
ApiResponse<List<List<RolesReportsHash>>> response = apiInstance.RolesReportGetWithHttpInfo();
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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<List<RolesReportsHash>>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | returns report | - |
[[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)

View File

@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.RolesReportsHash
Role report Hash
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**RoleUuid** | **Guid** | | [optional]
**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.RolesReportsHashRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,66 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
using NUnit.Framework;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHashRole
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashRoleTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHashRole
//private RolesReportsHashRole instance;
public RolesReportsHashRoleTests()
{
// TODO uncomment below to create an instance of RolesReportsHashRole
//instance = new RolesReportsHashRole();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHashRole
/// </summary>
[Test]
public void RolesReportsHashRoleInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHashRole
//Assert.IsType<RolesReportsHashRole>(instance);
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,74 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
using Newtonsoft.Json;
using NUnit.Framework;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing RolesReportsHash
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class RolesReportsHashTests : IDisposable
{
// TODO uncomment below to declare an instance variable for RolesReportsHash
//private RolesReportsHash instance;
public RolesReportsHashTests()
{
// TODO uncomment below to create an instance of RolesReportsHash
//instance = new RolesReportsHash();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of RolesReportsHash
/// </summary>
[Test]
public void RolesReportsHashInstanceTest()
{
// TODO uncomment below to test "IsType" RolesReportsHash
//Assert.IsType<RolesReportsHash>(instance);
}
/// <summary>
/// Test the property 'RoleUuid'
/// </summary>
[Test]
public void RoleUuidTest()
{
// TODO unit test for the property 'RoleUuid'
}
/// <summary>
/// Test the property 'Role'
/// </summary>
[Test]
public void RoleTest()
{
// TODO unit test for the property 'Role'
}
}
}

View File

@@ -79,6 +79,22 @@ namespace Org.OpenAPITools.Api
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception> /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of List&lt;Guid&gt;</returns> /// <returns>ApiResponse of List&lt;Guid&gt;</returns>
ApiResponse<List<Guid>> HelloWithHttpInfo(); ApiResponse<List<Guid>> HelloWithHttpInfo();
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
List<List<RolesReportsHash>> RolesReportGet();
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo();
#endregion Synchronous Operations #endregion Synchronous Operations
} }
@@ -153,6 +169,27 @@ namespace Org.OpenAPITools.Api
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns> /// <returns>Task of ApiResponse (List&lt;Guid&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); System.Threading.Tasks.Task<ApiResponse<List<Guid>>> HelloWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations #endregion Asynchronous Operations
} }
@@ -645,5 +682,117 @@ namespace Org.OpenAPITools.Api
return localVarResponse; return localVarResponse;
} }
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public List<List<RolesReportsHash>> RolesReportGet()
{
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = RolesReportGetWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> RolesReportGetWithHttpInfo()
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
// make the HTTP request
var localVarResponse = this.Client.Get<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null) throw _exception;
}
return localVarResponse;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;List&lt;RolesReportsHash&gt;&gt;</returns>
public async System.Threading.Tasks.Task<List<List<RolesReportsHash>>> RolesReportGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var task = RolesReportGetWithHttpInfoAsync(cancellationToken);
#if UNITY_EDITOR || !UNITY_WEBGL
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = await task.ConfigureAwait(false);
#else
Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>> localVarResponse = await task;
#endif
return localVarResponse.Data;
}
/// <summary>
///
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;List&lt;RolesReportsHash&gt;&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<List<RolesReportsHash>>>> RolesReportGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json"
};
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
// make the HTTP request
var task = this.AsynchronousClient.GetAsync<List<List<RolesReportsHash>>>("/roles/report", localVarRequestOptions, this.Configuration, cancellationToken);
#if UNITY_EDITOR || !UNITY_WEBGL
var localVarResponse = await task.ConfigureAwait(false);
#else
var localVarResponse = await task;
#endif
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("RolesReportGet", localVarResponse);
if (_exception != null) throw _exception;
}
return localVarResponse;
}
} }
} }

View File

@@ -0,0 +1,136 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
namespace Org.OpenAPITools.Model
{
/// <summary>
/// Role report Hash
/// </summary>
[DataContract(Name = "RolesReportsHash")]
public partial class RolesReportsHash : IEquatable<RolesReportsHash>
{
/// <summary>
/// Initializes a new instance of the <see cref="RolesReportsHash" /> class.
/// </summary>
/// <param name="roleUuid">roleUuid.</param>
/// <param name="role">role.</param>
public RolesReportsHash(Guid roleUuid = default(Guid), RolesReportsHashRole role = default(RolesReportsHashRole))
{
this.RoleUuid = roleUuid;
this.Role = role;
}
/// <summary>
/// Gets or Sets RoleUuid
/// </summary>
[DataMember(Name = "role_uuid", EmitDefaultValue = false)]
public Guid RoleUuid { get; set; }
/// <summary>
/// Gets or Sets Role
/// </summary>
[DataMember(Name = "role", EmitDefaultValue = false)]
public RolesReportsHashRole Role { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class RolesReportsHash {\n");
sb.Append(" RoleUuid: ").Append(RoleUuid).Append("\n");
sb.Append(" Role: ").Append(Role).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as RolesReportsHash);
}
/// <summary>
/// Returns true if RolesReportsHash instances are equal
/// </summary>
/// <param name="input">Instance of RolesReportsHash to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RolesReportsHash input)
{
if (input == null)
{
return false;
}
return
(
this.RoleUuid == input.RoleUuid ||
(this.RoleUuid != null &&
this.RoleUuid.Equals(input.RoleUuid))
) &&
(
this.Role == input.Role ||
(this.Role != null &&
this.Role.Equals(input.Role))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.RoleUuid != null)
{
hashCode = (hashCode * 59) + this.RoleUuid.GetHashCode();
}
if (this.Role != null)
{
hashCode = (hashCode * 59) + this.Role.GetHashCode();
}
return hashCode;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More