Skip to content

Commit f5f90c5

Browse files
committed
fix(Swagger): Fixed the Swagger documentation by adding custom tags to controllers and generating operation ids
WIP: will not build
1 parent 71e397f commit f5f90c5

21 files changed

+103
-436
lines changed

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1ApplicationController.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
19+
1820
namespace Synapse.Apis.Management.Http.Controllers
1921
{
2022

2123
/// <summary>
2224
/// Represents the <see cref="ApiController"/> used to manage the Synapse application
2325
/// </summary>
26+
[Tags("Application")]
2427
[Route("api/v1/application")]
2528
public class V1ApplicationController
2629
: ApiController

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1AuthenticationDefinitionCollectionsController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
1819
using ServerlessWorkflow.Sdk.Models;
1920

2021
namespace Synapse.Apis.Management.Http.Controllers
@@ -23,6 +24,7 @@ namespace Synapse.Apis.Management.Http.Controllers
2324
/// <summary>
2425
/// Represents the <see cref="ApiController"/> used to manage authentication definition collections
2526
/// </summary>
27+
[Tags("AuthenticationDefinitionCollections")]
2628
[Route("api/v1/resources/collections/authentications")]
2729
public class V1AuthenticationDefinitionCollectionsController
2830
: ApiController

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1CorrelationsController.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
19+
1820
namespace Synapse.Apis.Management.Http.Controllers
1921
{
2022

2123
/// <summary>
2224
/// Represents the <see cref="ApiController"/> used to manage correlation definitions
2325
/// </summary>
26+
[Tags("Correlations")]
2427
[Route("api/v1/correlations")]
2528
public class V1CorrelationsController
2629
: ApiController

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1EventDefinitionCollectionsController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
1819
using ServerlessWorkflow.Sdk.Models;
1920

2021
namespace Synapse.Apis.Management.Http.Controllers
@@ -23,6 +24,7 @@ namespace Synapse.Apis.Management.Http.Controllers
2324
/// <summary>
2425
/// Represents the <see cref="ApiController"/> used to manage event definition collections
2526
/// </summary>
27+
[Tags("EventDefinitionCollections")]
2628
[Route("api/v1/resources/collections/events")]
2729
public class V1EventDefinitionCollectionsController
2830
: ApiController

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1FunctionDefinitionCollectionsController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
1819
using ServerlessWorkflow.Sdk.Models;
1920

2021
namespace Synapse.Apis.Management.Http.Controllers
@@ -23,6 +24,7 @@ namespace Synapse.Apis.Management.Http.Controllers
2324
/// <summary>
2425
/// Represents the <see cref="ApiController"/> used to manage function definition collections
2526
/// </summary>
27+
[Tags("FunctionDefinitionCollections")]
2628
[Route("api/v1/resources/collections/functions")]
2729
public class V1FunctionDefinitionCollectionsController
2830
: ApiController

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1OperationalReportsController.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
19+
1820
namespace Synapse.Apis.Management.Http.Controllers
1921
{
2022

2123
/// <summary>
2224
/// Represents the <see cref="ApiController"/> used to manage application metrics
2325
/// </summary>
26+
[Tags("OperationalReports")]
2427
[Route("api/v1/reports/operations")]
2528
public class V1OperationalReportsController
2629
: ApiController

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1SchedulesController.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
19+
1820
namespace Synapse.Apis.Management.Http.Controllers
1921
{
2022

2123
/// <summary>
2224
/// Represents the <see cref="ApiController"/> used to manage schedules
2325
/// </summary>
26+
[Tags("Schedules")]
2427
[Route("api/v1/schedules")]
2528
public class V1SchedulesController
2629
: ApiController
@@ -100,7 +103,7 @@ public async Task<IActionResult> PatchSchedule(Integration.Commands.Generic.V1Pa
100103
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
101104
/// <returns>A new <see cref="IActionResult"/></returns>
102105
[HttpPut("{id}/trigger")]
103-
[ProducesResponseType((int)HttpStatusCode.NoContent)]
106+
[ProducesResponseType(typeof(Integration.Models.V1Schedule), (int)HttpStatusCode.OK)]
104107
[ProducesResponseType((int)HttpStatusCode.NotFound)]
105108
[ProducesResponseType((int)HttpStatusCode.Unauthorized)]
106109
[ProducesResponseType((int)HttpStatusCode.Forbidden)]
@@ -132,7 +135,7 @@ public async Task<IActionResult> SuspendSchedule(string id, CancellationToken ca
132135
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
133136
/// <returns>A new <see cref="IActionResult"/></returns>
134137
[HttpPut("{id}/resume")]
135-
[ProducesResponseType((int)HttpStatusCode.NoContent)]
138+
[ProducesResponseType(typeof(Integration.Models.V1Schedule), (int)HttpStatusCode.OK)]
136139
[ProducesResponseType((int)HttpStatusCode.NotFound)]
137140
[ProducesResponseType((int)HttpStatusCode.Unauthorized)]
138141
[ProducesResponseType((int)HttpStatusCode.Forbidden)]

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1WorkflowActivitiesController.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
19+
1820
namespace Synapse.Apis.Management.Http.Controllers
1921
{
2022

2123
/// <summary>
2224
/// Represents the <see cref="ApiController"/> used to manage workflow activities
2325
/// </summary>
26+
[Tags("WorkflowActivities")]
2427
[Route("api/v1/workflow-activities")]
2528
public class V1WorkflowActivitiesController
2629
: ApiController

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1WorkflowInstancesController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
1819
using System.Net.Mime;
1920

2021
namespace Synapse.Apis.Management.Http.Controllers
@@ -23,6 +24,7 @@ namespace Synapse.Apis.Management.Http.Controllers
2324
/// <summary>
2425
/// Represents the <see cref="ApiController"/> used to manage workflow instances
2526
/// </summary>
27+
[Tags("WorkflowInstances")]
2628
[Route("api/v1/workflow-instances")]
2729
public class V1WorkflowInstancesController
2830
: ApiController

src/apis/management/Synapse.Apis.Management.Http/Controllers/V1WorkflowsController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*/
1717

18+
using Microsoft.AspNetCore.Http;
1819
using System.Net.Mime;
1920

2021
namespace Synapse.Apis.Management.Http.Controllers
@@ -23,6 +24,7 @@ namespace Synapse.Apis.Management.Http.Controllers
2324
/// <summary>
2425
/// Represents the <see cref="ApiController"/> used to manage workflow definitions
2526
/// </summary>
27+
[Tags("Workflows")]
2628
[Route("api/v1/workflows")]
2729
public class V1WorkflowsController
2830
: ApiController

0 commit comments

Comments
 (0)