feat(MockController): Erstellt, um einen echten Server zu simulieren
This commit is contained in:
parent
54eca6fceb
commit
1fde6e7e34
@ -0,0 +1,23 @@
|
|||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Http.HttpResults;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace DigitalData.Swagger.MockAPI.Controllers
|
||||||
|
{
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class MockController : ControllerBase
|
||||||
|
{
|
||||||
|
[HttpPost("{servicetierName}/ODataV4/{webserviceName}_CreateInvoice")]
|
||||||
|
public IActionResult CreateInvoice([FromRoute] string servicetierName, [FromRoute] string webserviceName, [FromQuery] string company)
|
||||||
|
{
|
||||||
|
return Created($"{servicetierName}/ODataV4/{webserviceName}?id={1}", new { Id = 1, Foo = 1});
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("{servicetierName}/ODataV4/{webserviceName}")]
|
||||||
|
public IActionResult GetInvoice([FromRoute] string servicetierName, [FromRoute] string webserviceName, [FromQuery] string id)
|
||||||
|
{
|
||||||
|
return Ok(new { Id = id, Foo = 1 });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user