1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -05:00

test group get api for swagger

This commit is contained in:
Kyle Spearrin
2019-02-28 20:51:47 -05:00
parent c02f732056
commit 6e4df8cb0b
2 changed files with 45 additions and 2 deletions

View File

@ -1,4 +1,5 @@
using System;
using Bit.Core.Models.Api.Public;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@ -8,10 +9,23 @@ namespace Bit.Api.Public.Controllers
[Authorize("Organization")]
public class GroupsController : Controller
{
/// <summary>
/// Retrieves a specific product by unique id
/// </summary>
/// <remarks>Awesomeness!</remarks>
/// <response code="200">Group created</response>
/// <response code="400">Group has missing/invalid values</response>
/// <response code="500">Oops! Can't create your product right now</response>
[HttpGet("{id}")]
public JsonResult Get(string id)
[ProducesResponseType(typeof(GroupResponseModel), 200)]
public IActionResult Get(Guid id)
{
return new JsonResult("Hello " + id);
return new JsonResult(new GroupResponseModel(new Core.Models.Table.Group
{
Id = id,
Name = "test",
OrganizationId = Guid.NewGuid()
}));
}
}
}