Browse Source

Swagger fixes.

pull/329/head
Sebastian Stehle 7 years ago
parent
commit
11f993b374
  1. 3
      src/Squidex/Areas/Api/Config/Swagger/SwaggerExtensions.cs
  2. 1
      src/Squidex/Areas/Api/Config/Swagger/SwaggerServices.cs
  3. 5
      src/Squidex/Areas/Api/Config/Swagger/XmlResponseTypesProcessor.cs
  4. 15
      src/Squidex/Areas/Api/Config/Swagger/XmlTagProcessor.cs
  5. 3
      src/Squidex/Areas/Api/Controllers/Apps/AppClientsController.cs
  6. 3
      src/Squidex/Areas/Api/Controllers/Apps/AppContributorsController.cs
  7. 3
      src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs
  8. 3
      src/Squidex/Areas/Api/Controllers/Apps/AppPatternsController.cs
  9. 3
      src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs
  10. 3
      src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs
  11. 2
      src/Squidex/Areas/Api/Controllers/Assets/AssetsController.cs
  12. 3
      src/Squidex/Areas/Api/Controllers/Backups/BackupContentController.cs
  13. 3
      src/Squidex/Areas/Api/Controllers/Backups/BackupsController.cs
  14. 3
      src/Squidex/Areas/Api/Controllers/History/HistoryController.cs
  15. 3
      src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs
  16. 3
      src/Squidex/Areas/Api/Controllers/Ping/PingController.cs
  17. 6
      src/Squidex/Areas/Api/Controllers/Plans/AppPlansController.cs
  18. 3
      src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs
  19. 3
      src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs
  20. 3
      src/Squidex/Areas/Api/Controllers/Schemas/SchemasController.cs
  21. 3
      src/Squidex/Areas/Api/Controllers/Statistics/UsagesController.cs
  22. 3
      src/Squidex/Areas/Api/Controllers/UI/UIController.cs
  23. 3
      src/Squidex/Areas/Api/Controllers/Users/UsersController.cs

3
src/Squidex/Areas/Api/Config/Swagger/SwaggerExtensions.cs

@ -5,7 +5,6 @@
// All rights reserved. Licensed under the MIT license. // All rights reserved. Licensed under the MIT license.
// ========================================================================== // ==========================================================================
using System.Reflection;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -20,7 +19,7 @@ namespace Squidex.Areas.Api.Config.Swagger
{ {
var urlOptions = app.ApplicationServices.GetService<IOptions<MyUrlsOptions>>().Value; var urlOptions = app.ApplicationServices.GetService<IOptions<MyUrlsOptions>>().Value;
app.UseSwagger(typeof(SwaggerExtensions).GetTypeInfo().Assembly, settings => app.UseSwaggerWithApiExplorer(settings =>
{ {
settings.AddAssetODataParams(); settings.AddAssetODataParams();
settings.ConfigureNames(); settings.ConfigureNames();

1
src/Squidex/Areas/Api/Config/Swagger/SwaggerServices.cs

@ -106,7 +106,6 @@ namespace Squidex.Areas.Api.Config.Swagger
settings.GeneratorSettings.DocumentProcessors.Add(new RuleActionProcessor()); settings.GeneratorSettings.DocumentProcessors.Add(new RuleActionProcessor());
settings.GeneratorSettings.DocumentProcessors.Add(new XmlTagProcessor()); settings.GeneratorSettings.DocumentProcessors.Add(new XmlTagProcessor());
settings.GeneratorSettings.OperationProcessors.Add(new XmlTagProcessor());
settings.GeneratorSettings.OperationProcessors.Add(new XmlResponseTypesProcessor()); settings.GeneratorSettings.OperationProcessors.Add(new XmlResponseTypesProcessor());
return settings; return settings;

5
src/Squidex/Areas/Api/Config/Swagger/XmlResponseTypesProcessor.cs

@ -43,7 +43,7 @@ namespace Squidex.Areas.Api.Config.Swagger
response.Description = match.Groups["Description"].Value; response.Description = match.Groups["Description"].Value;
if (string.Equals(statusCode, "200", StringComparison.OrdinalIgnoreCase)) if (statusCode == "200" || statusCode == "204")
{ {
hasOkResponse = true; hasOkResponse = true;
} }
@ -72,8 +72,7 @@ namespace Squidex.Areas.Api.Config.Swagger
private static void RemoveOkResponse(SwaggerOperation operation) private static void RemoveOkResponse(SwaggerOperation operation)
{ {
if (operation.Responses.TryGetValue("200", out var response) && if (operation.Responses.TryGetValue("200", out var response) &&
response.Description != null && response.Description?.Contains("=>") == true)
response.Description.Contains("=>"))
{ {
operation.Responses.Remove("200"); operation.Responses.Remove("200");
} }

15
src/Squidex/Areas/Api/Config/Swagger/XmlTagProcessor.cs

@ -16,7 +16,7 @@ using Squidex.Infrastructure.Tasks;
namespace Squidex.Areas.Api.Config.Swagger namespace Squidex.Areas.Api.Config.Swagger
{ {
public sealed class XmlTagProcessor : IOperationProcessor, IDocumentProcessor public sealed class XmlTagProcessor : IDocumentProcessor
{ {
public Task ProcessAsync(DocumentProcessorContext context) public Task ProcessAsync(DocumentProcessorContext context)
{ {
@ -47,18 +47,5 @@ namespace Squidex.Areas.Api.Config.Swagger
return TaskHelper.Done; return TaskHelper.Done;
} }
public Task<bool> ProcessAsync(OperationProcessorContext context)
{
var tagAttribute = context.MethodInfo.DeclaringType.GetTypeInfo().GetCustomAttribute<SwaggerTagAttribute>();
if (tagAttribute != null)
{
context.OperationDescription.Operation.Tags.Clear();
context.OperationDescription.Operation.Tags.Add(tagAttribute.Name);
}
return TaskHelper.True;
}
} }
} }

3
src/Squidex/Areas/Api/Controllers/Apps/AppClientsController.cs

@ -8,7 +8,6 @@
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Areas.Api.Controllers.Apps.Models;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
@ -23,7 +22,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[MustBeAppEditor] [MustBeAppEditor]
[SwaggerTag(nameof(Apps))] [ApiExplorerSettings(GroupName = nameof(Apps))]
public sealed class AppClientsController : ApiController public sealed class AppClientsController : ApiController
{ {
public AppClientsController(ICommandBus commandBus) public AppClientsController(ICommandBus commandBus)

3
src/Squidex/Areas/Api/Controllers/Apps/AppContributorsController.cs

@ -7,7 +7,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Areas.Api.Controllers.Apps.Models;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Domain.Apps.Entities.Apps.Services; using Squidex.Domain.Apps.Entities.Apps.Services;
@ -23,7 +22,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[MustBeAppOwner] [MustBeAppOwner]
[SwaggerTag(nameof(Apps))] [ApiExplorerSettings(GroupName = nameof(Apps))]
public sealed class AppContributorsController : ApiController public sealed class AppContributorsController : ApiController
{ {
private readonly IAppPlansProvider appPlansProvider; private readonly IAppPlansProvider appPlansProvider;

3
src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs

@ -8,7 +8,6 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Areas.Api.Controllers.Apps.Models;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
@ -23,7 +22,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
[ApiAuthorize] [ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(Apps))] [ApiExplorerSettings(GroupName = nameof(Apps))]
public sealed class AppLanguagesController : ApiController public sealed class AppLanguagesController : ApiController
{ {
public AppLanguagesController(ICommandBus commandBus) public AppLanguagesController(ICommandBus commandBus)

3
src/Squidex/Areas/Api/Controllers/Apps/AppPatternsController.cs

@ -9,7 +9,6 @@ using System;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Areas.Api.Controllers.Apps.Models;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
@ -24,7 +23,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
[MustBeAppDeveloper] [MustBeAppDeveloper]
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(Apps))] [ApiExplorerSettings(GroupName = nameof(Apps))]
public sealed class AppPatternsController : ApiController public sealed class AppPatternsController : ApiController
{ {
public AppPatternsController(ICommandBus commandBus) public AppPatternsController(ICommandBus commandBus)

3
src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs

@ -9,7 +9,6 @@ using System;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Areas.Api.Controllers.Apps.Models;
using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
@ -25,7 +24,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
/// </summary> /// </summary>
[ApiAuthorize] [ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[SwaggerTag(nameof(Apps))] [ApiExplorerSettings(GroupName = nameof(Apps))]
public sealed class AppsController : ApiController public sealed class AppsController : ApiController
{ {
private readonly IAppProvider appProvider; private readonly IAppProvider appProvider;

3
src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs

@ -9,7 +9,6 @@ using System;
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Domain.Apps.Entities.Assets.Repositories; using Squidex.Domain.Apps.Entities.Assets.Repositories;
using Squidex.Infrastructure.Assets; using Squidex.Infrastructure.Assets;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
@ -24,7 +23,7 @@ namespace Squidex.Areas.Api.Controllers.Assets
/// </summary> /// </summary>
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(Assets))] [ApiExplorerSettings(GroupName = nameof(Assets))]
public sealed class AssetContentController : ApiController public sealed class AssetContentController : ApiController
{ {
private readonly IAssetStore assetStore; private readonly IAssetStore assetStore;

2
src/Squidex/Areas/Api/Controllers/Assets/AssetsController.cs

@ -33,7 +33,7 @@ namespace Squidex.Areas.Api.Controllers.Assets
[ApiAuthorize] [ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(Assets))] [ApiExplorerSettings(GroupName = nameof(Assets))]
public sealed class AssetsController : ApiController public sealed class AssetsController : ApiController
{ {
private readonly IAssetQueryService assetQuery; private readonly IAssetQueryService assetQuery;

3
src/Squidex/Areas/Api/Controllers/Backups/BackupContentController.cs

@ -7,7 +7,6 @@
using System; using System;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Infrastructure.Assets; using Squidex.Infrastructure.Assets;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline; using Squidex.Pipeline;
@ -19,7 +18,7 @@ namespace Squidex.Areas.Api.Controllers.Backups
/// </summary> /// </summary>
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(Backups))] [ApiExplorerSettings(GroupName = nameof(Backups))]
public class BackupContentController : ApiController public class BackupContentController : ApiController
{ {
private readonly IAssetStore assetStore; private readonly IAssetStore assetStore;

3
src/Squidex/Areas/Api/Controllers/Backups/BackupsController.cs

@ -10,7 +10,6 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Orleans; using Orleans;
using Squidex.Areas.Api.Controllers.Backups.Models; using Squidex.Areas.Api.Controllers.Backups.Models;
using Squidex.Domain.Apps.Entities.Backup; using Squidex.Domain.Apps.Entities.Backup;
@ -27,7 +26,7 @@ namespace Squidex.Areas.Api.Controllers.Backups
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[MustBeAppOwner] [MustBeAppOwner]
[SwaggerTag(nameof(Backups))] [ApiExplorerSettings(GroupName = nameof(Backups))]
public class BackupsController : ApiController public class BackupsController : ApiController
{ {
private readonly IGrainFactory grainFactory; private readonly IGrainFactory grainFactory;

3
src/Squidex/Areas/Api/Controllers/History/HistoryController.cs

@ -8,7 +8,6 @@
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.History.Models; using Squidex.Areas.Api.Controllers.History.Models;
using Squidex.Domain.Apps.Entities.History.Repositories; using Squidex.Domain.Apps.Entities.History.Repositories;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
@ -23,7 +22,7 @@ namespace Squidex.Areas.Api.Controllers.History
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[MustBeAppEditor] [MustBeAppEditor]
[SwaggerTag(nameof(History))] [ApiExplorerSettings(GroupName = nameof(History))]
public sealed class HistoryController : ApiController public sealed class HistoryController : ApiController
{ {
private readonly IHistoryEventRepository historyEventRepository; private readonly IHistoryEventRepository historyEventRepository;

3
src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs

@ -7,7 +7,6 @@
using System.Linq; using System.Linq;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline; using Squidex.Pipeline;
@ -19,7 +18,7 @@ namespace Squidex.Areas.Api.Controllers.Languages
/// </summary> /// </summary>
[ApiAuthorize] [ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[SwaggerTag(nameof(Languages))] [ApiExplorerSettings(GroupName = nameof(Languages))]
public sealed class LanguagesController : ApiController public sealed class LanguagesController : ApiController
{ {
public LanguagesController(ICommandBus commandBus) public LanguagesController(ICommandBus commandBus)

3
src/Squidex/Areas/Api/Controllers/Ping/PingController.cs

@ -6,7 +6,6 @@
// ========================================================================== // ==========================================================================
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline; using Squidex.Pipeline;
@ -16,7 +15,7 @@ namespace Squidex.Areas.Api.Controllers.Ping
/// Makes a ping request. /// Makes a ping request.
/// </summary> /// </summary>
[ApiExceptionFilter] [ApiExceptionFilter]
[SwaggerTag(nameof(Ping))] [ApiExplorerSettings(GroupName = nameof(Ping))]
public sealed class PingController : ApiController public sealed class PingController : ApiController
{ {
public PingController(ICommandBus commandBus) public PingController(ICommandBus commandBus)

6
src/Squidex/Areas/Api/Controllers/Plans/AppPlansController.cs

@ -7,7 +7,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Plans.Models; using Squidex.Areas.Api.Controllers.Plans.Models;
using Squidex.Domain.Apps.Entities.Apps.Services; using Squidex.Domain.Apps.Entities.Apps.Services;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
@ -21,7 +20,7 @@ namespace Squidex.Areas.Api.Controllers.Plans
[ApiAuthorize] [ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(Plans))] [ApiExplorerSettings(GroupName = nameof(Plans))]
public sealed class AppPlansController : ApiController public sealed class AppPlansController : ApiController
{ {
private readonly IAppPlansProvider appPlansProvider; private readonly IAppPlansProvider appPlansProvider;
@ -66,8 +65,7 @@ namespace Squidex.Areas.Api.Controllers.Plans
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="request">Plan object that needs to be changed.</param> /// <param name="request">Plan object that needs to be changed.</param>
/// <returns> /// <returns>
/// 201 => Redirected to checkout page. /// 200 => Plan changed or redirect url returned.
/// 204 => Plan changed.
/// 400 => Plan not owned by user. /// 400 => Plan not owned by user.
/// 404 => App not found. /// 404 => App not found.
/// </returns> /// </returns>

3
src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs

@ -11,7 +11,6 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NodaTime; using NodaTime;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Rules.Models; using Squidex.Areas.Api.Controllers.Rules.Models;
using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities;
using Squidex.Domain.Apps.Entities.Rules.Commands; using Squidex.Domain.Apps.Entities.Rules.Commands;
@ -29,7 +28,7 @@ namespace Squidex.Areas.Api.Controllers.Rules
[ApiAuthorize] [ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(Rules))] [ApiExplorerSettings(GroupName = nameof(Rules))]
[MustBeAppDeveloper] [MustBeAppDeveloper]
public sealed class RulesController : ApiController public sealed class RulesController : ApiController
{ {

3
src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs

@ -7,7 +7,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Schemas.Models; using Squidex.Areas.Api.Controllers.Schemas.Models;
using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Domain.Apps.Entities.Schemas.Commands;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
@ -22,7 +21,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[MustBeAppDeveloper] [MustBeAppDeveloper]
[SwaggerTag(nameof(Schemas))] [ApiExplorerSettings(GroupName = nameof(Schemas))]
public sealed class SchemaFieldsController : ApiController public sealed class SchemaFieldsController : ApiController
{ {
public SchemaFieldsController(ICommandBus commandBus) public SchemaFieldsController(ICommandBus commandBus)

3
src/Squidex/Areas/Api/Controllers/Schemas/SchemasController.cs

@ -9,7 +9,6 @@ using System;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Schemas.Models; using Squidex.Areas.Api.Controllers.Schemas.Models;
using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities;
using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Domain.Apps.Entities.Schemas;
@ -25,7 +24,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
[ApiAuthorize] [ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(Schemas))] [ApiExplorerSettings(GroupName = nameof(Schemas))]
public sealed class SchemasController : ApiController public sealed class SchemasController : ApiController
{ {
private readonly IAppProvider appProvider; private readonly IAppProvider appProvider;

3
src/Squidex/Areas/Api/Controllers/Statistics/UsagesController.cs

@ -10,7 +10,6 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Statistics.Models; using Squidex.Areas.Api.Controllers.Statistics.Models;
using Squidex.Domain.Apps.Entities.Apps.Services; using Squidex.Domain.Apps.Entities.Apps.Services;
using Squidex.Domain.Apps.Entities.Assets.Repositories; using Squidex.Domain.Apps.Entities.Assets.Repositories;
@ -27,7 +26,7 @@ namespace Squidex.Areas.Api.Controllers.Statistics
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[MustBeAppEditor] [MustBeAppEditor]
[SwaggerTag(nameof(Statistics))] [ApiExplorerSettings(GroupName = nameof(Statistics))]
public sealed class UsagesController : ApiController public sealed class UsagesController : ApiController
{ {
private readonly IUsageTracker usageTracker; private readonly IUsageTracker usageTracker;

3
src/Squidex/Areas/Api/Controllers/UI/UIController.cs

@ -8,7 +8,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using NSwag.Annotations;
using Orleans; using Orleans;
using Squidex.Areas.Api.Controllers.UI.Models; using Squidex.Areas.Api.Controllers.UI.Models;
using Squidex.Config; using Squidex.Config;
@ -25,7 +24,7 @@ namespace Squidex.Areas.Api.Controllers.UI
[ApiAuthorize] [ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi] [AppApi]
[SwaggerTag(nameof(UI))] [ApiExplorerSettings(GroupName = nameof(UI))]
public sealed class UIController : ApiController public sealed class UIController : ApiController
{ {
private readonly MyUIOptions uiOptions; private readonly MyUIOptions uiOptions;

3
src/Squidex/Areas/Api/Controllers/Users/UsersController.cs

@ -12,7 +12,6 @@ using System.Net.Http;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Areas.Api.Controllers.Users.Models; using Squidex.Areas.Api.Controllers.Users.Models;
using Squidex.Domain.Users; using Squidex.Domain.Users;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
@ -26,7 +25,7 @@ namespace Squidex.Areas.Api.Controllers.Users
/// Readonly API to retrieve information about squidex users. /// Readonly API to retrieve information about squidex users.
/// </summary> /// </summary>
[ApiExceptionFilter] [ApiExceptionFilter]
[SwaggerTag(nameof(Users))] [ApiExplorerSettings(GroupName = nameof(Users))]
public sealed class UsersController : ApiController public sealed class UsersController : ApiController
{ {
private static readonly byte[] AvatarBytes; private static readonly byte[] AvatarBytes;

Loading…
Cancel
Save