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:
@ -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()
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user