Initial Commit from Swagger-Gen
This commit is contained in:
97
src/IO.Swagger/Controllers/AuthApi.cs
Normal file
97
src/IO.Swagger/Controllers/AuthApi.cs
Normal file
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* T&J Central Bank API
|
||||
*
|
||||
* API documentation for T&J Central Bank's digital wallets
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using IO.Swagger.Attributes;
|
||||
using IO.Swagger.Security;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using IO.Swagger.Models;
|
||||
|
||||
namespace IO.Swagger.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
public class AuthApiController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Get user details
|
||||
/// </summary>
|
||||
/// <response code="200">Successful response</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpGet]
|
||||
[Route("/v1/api/auth/details")]
|
||||
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("GetUserDetails")]
|
||||
public virtual IActionResult GetUserDetails()
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(200);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log in with email and password
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <response code="200">Logged in successfully</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpPost]
|
||||
[Route("/v1/api/auth/login")]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("LoginUser")]
|
||||
public virtual IActionResult LoginUser([FromBody]AuthLoginBody body)
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(200);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register a new user
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <response code="201">User registered successfully</response>
|
||||
/// <response code="400">Bad Request</response>
|
||||
/// <response code="409">Conflict (user with provided email already exists)</response>
|
||||
[HttpPost]
|
||||
[Route("/v1/api/auth/register")]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("RegisterUser")]
|
||||
public virtual IActionResult RegisterUser([FromBody]AuthRegisterBody body)
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(201);
|
||||
|
||||
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(400);
|
||||
|
||||
//TODO: Uncomment the next line to return response 409 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(409);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
134
src/IO.Swagger/Controllers/CurrencyApi.cs
Normal file
134
src/IO.Swagger/Controllers/CurrencyApi.cs
Normal file
@ -0,0 +1,134 @@
|
||||
/*
|
||||
* T&J Central Bank API
|
||||
*
|
||||
* API documentation for T&J Central Bank's digital wallets
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using IO.Swagger.Attributes;
|
||||
using IO.Swagger.Security;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using IO.Swagger.Models;
|
||||
|
||||
namespace IO.Swagger.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
public class CurrencyApiController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Add a digital asset to the user's collection
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <response code="201">Successful asset addition</response>
|
||||
/// <response code="400">Bad Request</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpPost]
|
||||
[Route("/v1/api/currency/addAsset")]
|
||||
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("AddDigitalAssetToCollection")]
|
||||
public virtual IActionResult AddDigitalAssetToCollection([FromBody]CurrencyAddAssetBody body)
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(201);
|
||||
|
||||
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(400);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new collection of digital assets owned by the user
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <response code="201">Successful collection creation</response>
|
||||
/// <response code="400">Bad Request</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpPost]
|
||||
[Route("/v1/api/currency/createCollection")]
|
||||
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("CreateAssetCollection")]
|
||||
public virtual IActionResult CreateAssetCollection([FromBody]CurrencyCreateCollectionBody body)
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(201);
|
||||
|
||||
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(400);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new currency type
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <response code="201">Currency type created successfully</response>
|
||||
/// <response code="400">Bad Request</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpPost]
|
||||
[Route("/v1/api/currency/create")]
|
||||
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("CreateCurrency")]
|
||||
public virtual IActionResult CreateCurrency([FromBody]CurrencyCreateBody body)
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(201);
|
||||
|
||||
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(400);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mint additional units of a currency
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <response code="200">Successful minting</response>
|
||||
/// <response code="400">Bad Request</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpPost]
|
||||
[Route("/v1/api/currency/mint")]
|
||||
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("MintCurrency")]
|
||||
public virtual IActionResult MintCurrency([FromBody]CurrencyMintBody body)
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(200);
|
||||
|
||||
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(400);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
103
src/IO.Swagger/Controllers/WalletApi.cs
Normal file
103
src/IO.Swagger/Controllers/WalletApi.cs
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* T&J Central Bank API
|
||||
*
|
||||
* API documentation for T&J Central Bank's digital wallets
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using IO.Swagger.Attributes;
|
||||
using IO.Swagger.Security;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using IO.Swagger.Models;
|
||||
|
||||
namespace IO.Swagger.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
public class WalletApiController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Get user's wallet
|
||||
/// </summary>
|
||||
/// <response code="200">Successful response</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpGet]
|
||||
[Route("/v1/api/wallet")]
|
||||
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("GetUserWallet")]
|
||||
public virtual IActionResult GetUserWallet()
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(200);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer digital asset to another user
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <response code="200">Successful transfer</response>
|
||||
/// <response code="400">Bad Request</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpPost]
|
||||
[Route("/v1/api/wallet/transferDigital")]
|
||||
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("TransferDigitalAsset")]
|
||||
public virtual IActionResult TransferDigitalAsset([FromBody]WalletTransferDigitalBody body)
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(200);
|
||||
|
||||
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(400);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer physical currency to another user
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <response code="200">Successful transfer</response>
|
||||
/// <response code="400">Bad Request</response>
|
||||
/// <response code="401">Unauthorized</response>
|
||||
[HttpPost]
|
||||
[Route("/v1/api/wallet/transferPhysical")]
|
||||
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
||||
[ValidateModelState]
|
||||
[SwaggerOperation("TransferPhysicalCurrency")]
|
||||
public virtual IActionResult TransferPhysicalCurrency([FromBody]WalletTransferPhysicalBody body)
|
||||
{
|
||||
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(200);
|
||||
|
||||
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(400);
|
||||
|
||||
//TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
||||
// return StatusCode(401);
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user