Skip to content

Commit

Permalink
chore(webapi): Remove old UpdateDialog Swagger config (#1470)
Browse files Browse the repository at this point in the history
- **Chores**
- Removed outdated methods related to request example bodies in Swagger
documentation.
  • Loading branch information
oskogstad authored Nov 14, 2024
1 parent 326b8b8 commit 6eb97e7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 369 deletions.
134 changes: 0 additions & 134 deletions docs/schema/V1/swagger.verified.json
Original file line number Diff line number Diff line change
Expand Up @@ -6145,140 +6145,6 @@
"requestBody": {
"content": {
"application/json": {
"example": {
"Activities": [
{
"CreatedAt": null,
"Description": [
{
"LanguageCode": "en",
"Value": "Some description"
},
{
"LanguageCode": "nb",
"Value": "En beskrivelse"
}
],
"ExtendedType": null,
"Id": "8b95d42d-d2b6-4c01-8ca0-a817a4b3c50d",
"PerformedBy": {
"ActorId": null,
"ActorName": null,
"ActorType": 2
},
"TransmissionId": null,
"Type": 3
}
],
"ApiActions": [
{
"Action": "submit",
"AuthorizationAttribute": null,
"Endpoints": [
{
"Deprecated": false,
"DocumentationUrl": "https://example.com/some-api-action-doc",
"HttpMethod": 2,
"Id": null,
"RequestSchema": "https://example.com/some-api-action-request-schema",
"ResponseSchema": "https://example.com/some-api-action-response-schema",
"SunsetAt": null,
"Url": "https://example.com/some-api-action",
"Version": "20231015"
}
],
"Id": "948b07ba-1a82-403e-8eaa-2e5784af07a9"
}
],
"Attachments": [
{
"DisplayName": [
{
"LanguageCode": "en",
"Value": "Some display name"
}
],
"Id": "02a72809-eddd-4192-864d-8f1755d72f4e",
"Urls": [
{
"ConsumerType": 0,
"Id": "858177cb-8584-4d10-a086-3a5defa7a6c3",
"MediaType": null,
"Url": "https://example.com/some-url"
}
]
}
],
"Content": {
"AdditionalInfo": {
"MediaType": "text/markdown",
"Value": [
{
"LanguageCode": "en",
"Value": "Some description with *markdown* support"
}
]
},
"ExtendedStatus": null,
"MainContentReference": null,
"SenderName": null,
"Summary": {
"MediaType": "text/plain",
"Value": [
{
"LanguageCode": "en",
"Value": "Some Summary"
}
]
},
"Title": {
"MediaType": "text/plain",
"Value": [
{
"LanguageCode": "en",
"Value": "Some title"
}
]
}
},
"DueAt": "2084-04-04T12:13:10.01344\u002B00:00",
"ExpiresAt": "2095-05-04T12:13:10.01344\u002B00:00",
"ExtendedStatus": "Some extended status",
"ExternalReference": "Some external reference",
"GuiActions": [
{
"Action": "submit",
"AuthorizationAttribute": null,
"HttpMethod": 1,
"Id": "8c64ecc8-7678-44b2-8788-0b5852dd8fa0",
"IsDeleteDialogAction": false,
"Priority": 1,
"Prompt": null,
"Title": [
{
"LanguageCode": "en",
"Value": "GUI action title"
},
{
"LanguageCode": "nb",
"Value": "GUI action-tittel"
}
],
"Url": "https://example.com/some-url"
}
],
"Progress": 42,
"SearchTags": [
{
"Value": "searchTag"
},
{
"Value": "anotherSearchTag"
}
],
"Status": 1,
"VisibleFrom": "2054-03-04T12:13:10.01344\u002B00:00"
},
"schema": {
"$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Digdir.Domain.Dialogporten.WebApi.Common;
using Digdir.Domain.Dialogporten.WebApi.Common.Authorization;
using Digdir.Domain.Dialogporten.WebApi.Common.Extensions;
using FastEndpoints;

namespace Digdir.Domain.Dialogporten.WebApi.Endpoints.V1.ServiceOwner.Dialogs.Update;

public sealed class UpdateDialogEndpointSummary : Summary<UpdateDialogEndpoint>
{
public UpdateDialogEndpointSummary()
{
Summary = "Replaces a dialog";
Description = $"""
Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).
{Constants.SwaggerSummary.OptimisticConcurrencyNote}
""";
Responses[StatusCodes.Status204NoContent] = Constants.SwaggerSummary.Updated.FormatInvariant("aggregate");
Responses[StatusCodes.Status400BadRequest] = Constants.SwaggerSummary.ValidationError;
Responses[StatusCodes.Status401Unauthorized] =
Constants.SwaggerSummary.ServiceOwnerAuthenticationFailure.FormatInvariant(AuthorizationScope
.ServiceProvider);
Responses[StatusCodes.Status403Forbidden] =
Constants.SwaggerSummary.AccessDeniedToDialog.FormatInvariant("update");
Responses[StatusCodes.Status404NotFound] = Constants.SwaggerSummary.DialogNotFound;
Responses[StatusCodes.Status412PreconditionFailed] = Constants.SwaggerSummary.RevisionMismatch;
Responses[StatusCodes.Status422UnprocessableEntity] = Constants.SwaggerSummary.DomainError;
}
}

This file was deleted.

Loading

0 comments on commit 6eb97e7

Please sign in to comment.