Skip to content

Commit

Permalink
Change init correspondence response object (#1833)
Browse files Browse the repository at this point in the history
* remove migrationcontroller endpoints

* add published

* fix: use InitializeCorrespondenceResponse for init correspondence and upload
  • Loading branch information
CelineTrammi authored Oct 18, 2024
1 parent 3675dba commit b6af7bd
Showing 1 changed file with 65 additions and 139 deletions.
204 changes: 65 additions & 139 deletions static/swagger/altinn-correspondence-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"description": "TT02"
}
],
"paths": {
"paths": {
"/correspondence/api/v1/attachment": {
"post": {
"tags": [
Expand Down Expand Up @@ -212,7 +212,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CorrespondenceOverviewExt"
"$ref": "#/components/schemas/InitializeCorrespondencesResponseExt"
}
}
}
Expand Down Expand Up @@ -438,6 +438,10 @@
"Correspondence.IgnoreReservation": {
"type": "boolean"
},
"Correspondence.Published": {
"type": "string",
"format": "date-time"
},
"Recipients": {
"type": "array",
"items": {
Expand Down Expand Up @@ -545,6 +549,9 @@
"Correspondence.IgnoreReservation": {
"style": "form"
},
"Correspondence.Published": {
"style": "form"
},
"Recipients": {
"style": "form"
},
Expand All @@ -564,7 +571,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CorrespondenceOverviewExt"
"$ref": "#/components/schemas/InitializeCorrespondencesResponseExt"
}
}
}
Expand Down Expand Up @@ -833,64 +840,6 @@
}
}
},
"/correspondence/api/v1/migration/correspondence": {
"post": {
"tags": [
"Migration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MigrateCorrespondenceExt"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CorrespondenceMigrationStatusExt"
}
}
}
}
}
}
},
"/correspondence/api/v1/migration/correspondence/{correspondenceId}": {
"get": {
"tags": [
"Migration"
],
"parameters": [
{
"name": "correspondenceId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CorrespondenceOverviewExt"
}
}
}
}
}
}
},
"/idporten-callback": {
"get": {
"tags": [
Expand Down Expand Up @@ -1027,23 +976,6 @@
},
"additionalProperties": false
},
"AttachmentMigrationStatusExt": {
"required": [
"attachmentId",
"status"
],
"type": "object",
"properties": {
"attachmentId": {
"type": "string",
"format": "uuid"
},
"status": {
"$ref": "#/components/schemas/AttachmentStatusExt"
}
},
"additionalProperties": false
},
"AttachmentOverviewExt": {
"required": [
"attachmentId",
Expand Down Expand Up @@ -1436,30 +1368,10 @@
"$ref": "#/components/schemas/NotificationExt"
},
"nullable": true
}
},
"additionalProperties": false
},
"CorrespondenceMigrationStatusExt": {
"required": [
"altinn2CorrespondenceId",
"correspondenceId"
],
"type": "object",
"properties": {
"altinn2CorrespondenceId": {
"type": "integer",
"format": "int32"
},
"correspondenceId": {
"Published": {
"type": "string",
"format": "uuid"
},
"attachmentStatuses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AttachmentMigrationStatusExt"
},
"format": "date-time",
"nullable": true
}
},
Expand Down Expand Up @@ -1918,63 +1830,77 @@
},
"additionalProperties": false
},
"MigrateCorrespondenceExt": {
"required": [
"altinn2CorrespondenceId",
"correspondenceData"
],
"InitializeCorrespondencesResponseExt": {
"type": "object",
"properties": {
"correspondenceData": {
"$ref": "#/components/schemas/InitializeCorrespondencesExt"
},
"altinn2CorrespondenceId": {
"type": "integer",
"format": "int32"
},
"eventHistory": {
"correspondences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CorrespondenceStatusEventExt"
},
"nullable": true
"$ref": "#/components/schemas/CorrespondenceDetails"
}
},
"notificationHistory": {
"attachmentIds": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MigrateCorrespondenceNotificationExt"
},
"nullable": true
"type": "string",
"format": "uuid"
}
}
},
"additionalProperties": false
}
},
"MigrateCorrespondenceNotificationExt": {
"required": [
"altinn2NotificationId",
"notificationAddress",
"notificationChannel",
"notificationSent"
],
"CorrespondenceDetails": {
"type": "object",
"properties": {
"notificationChannel": {
"$ref": "#/components/schemas/NotificationChannelExt"
},
"notificationSent": {
"CorrespondenceId": {
"type": "string",
"format": "date-time"
"format": "uuid"
},
"altinn2NotificationId": {
"type": "integer",
"format": "int32"
"Status": {
"$ref": "#/components/schemas/CorrespondenceStatusExt"
},
"Recipient": {
"type": "string"
},
"notificationAddress": {
"Notifications": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NotificationDetails"
}
}
},
"required": [
"CorrespondenceId",
"Status",
"Recipient"
]
},
"NotificationDetails": {
"type": "object",
"properties": {
"OrderId": {
"type": "string",
"format": "uuid",
"nullable": true
},
"IsReminder": {
"type": "boolean",
"nullable": true
},
"Status": {
"$ref": "#/components/schemas/NotificationStatus"
}
},
"additionalProperties": false
"required": [
"Status"
]
},
"NotificationStatus": {
"type": "string",
"enum": [
"Success",
"MissingContact",
"Failure"
]
},
"NotificationChannelExt": {
"enum": [
Expand Down

0 comments on commit b6af7bd

Please sign in to comment.