|
|
|
@ -42,8 +42,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPost] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 409)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> PostField(string app, string name, [FromBody] AddFieldDto request) |
|
|
|
@ -71,8 +69,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPost] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 409)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> PostNestedField(string app, string name, long parentId, [FromBody] AddFieldDto request) |
|
|
|
@ -91,14 +87,13 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
/// <param name="name">The name of the schema.</param>
|
|
|
|
/// <param name="request">The request that contains the field ids.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// 200 => Schema fields reorderd.
|
|
|
|
/// 200 => Schema fields reordered.
|
|
|
|
/// 400 => Schema field ids do not cover the fields of the schema.
|
|
|
|
/// 404 => Schema or app not found.
|
|
|
|
/// </returns>
|
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/ordering/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> PutSchemaFieldOrdering(string app, string name, [FromBody] ReorderFieldsDto request) |
|
|
|
@ -118,14 +113,13 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
/// <param name="parentId">The parent field id.</param>
|
|
|
|
/// <param name="request">The request that contains the field ids.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// 200 => Schema fields reorderd.
|
|
|
|
/// 200 => Schema fields reordered.
|
|
|
|
/// 400 => Schema field ids do not cover the fields of the schema.
|
|
|
|
/// 404 => Schema, field or app not found.
|
|
|
|
/// </returns>
|
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/ordering/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> PutNestedFieldOrdering(string app, string name, long parentId, [FromBody] ReorderFieldsDto request) |
|
|
|
@ -152,7 +146,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{id:long}/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> PutField(string app, string name, long id, [FromBody] UpdateFieldDto request) |
|
|
|
@ -180,7 +173,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/{id:long}/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> PutNestedField(string app, string name, long parentId, long id, [FromBody] UpdateFieldDto request) |
|
|
|
@ -209,7 +201,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{id:long}/lock/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> LockField(string app, string name, long id) |
|
|
|
@ -239,7 +230,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/{id:long}/lock/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> LockNestedField(string app, string name, long parentId, long id) |
|
|
|
@ -268,7 +258,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{id:long}/hide/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> HideField(string app, string name, long id) |
|
|
|
@ -298,7 +287,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/{id:long}/hide/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> HideNestedField(string app, string name, long parentId, long id) |
|
|
|
@ -327,7 +315,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{id:long}/show/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> ShowField(string app, string name, long id) |
|
|
|
@ -356,7 +343,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
/// </remarks>
|
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/{id:long}/show/")] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> ShowNestedField(string app, string name, long parentId, long id) |
|
|
|
@ -385,7 +372,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{id:long}/enable/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> EnableField(string app, string name, long id) |
|
|
|
@ -415,7 +401,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/{id:long}/enable/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> EnableNestedField(string app, string name, long parentId, long id) |
|
|
|
@ -444,7 +429,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{id:long}/disable/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> DisableField(string app, string name, long id) |
|
|
|
@ -474,7 +458,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpPut] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/{id:long}/disable/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> DisableNestedField(string app, string name, long parentId, long id) |
|
|
|
@ -500,7 +483,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpDelete] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{id:long}/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> DeleteField(string app, string name, long id) |
|
|
|
@ -527,7 +509,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas |
|
|
|
[HttpDelete] |
|
|
|
[Route("apps/{app}/schemas/{name}/fields/{parentId:long}/nested/{id:long}/")] |
|
|
|
[ProducesResponseType(typeof(SchemaDetailsDto), 200)] |
|
|
|
[ProducesResponseType(typeof(ErrorDto), 400)] |
|
|
|
[ApiPermission(Permissions.AppSchemasUpdate)] |
|
|
|
[ApiCosts(1)] |
|
|
|
public async Task<IActionResult> DeleteNestedField(string app, string name, long parentId, long id) |
|
|
|
|