Skip to content

Commit

Permalink
[SELC-5851] Adding acknowledgment to openapi onboarding fn (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-putzu authored Oct 25, 2024
1 parent dc30ed9 commit b139335
Showing 1 changed file with 172 additions and 2 deletions.
174 changes: 172 additions & 2 deletions apps/onboarding-functions/src/main/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"/api/ResendNotification": {
"post": {
"tags": [
"Notification", "support"
"Notification",
"support"
],
"operationId": "sendOnboardigNotificationUsingPOST",
"summary": "",
Expand Down Expand Up @@ -50,7 +51,8 @@
"/api/onboardings/notifications/count": {
"get": {
"tags": [
"Notification", "support"
"Notification",
"support"
],
"summary": "Count notifications by filters",
"description": "Performs for every product a count of relative onboarding notifications sent",
Expand Down Expand Up @@ -107,10 +109,120 @@
}
]
}
},
"/api/acknowledgment/{productId}/message/{messageId}/status/{status}": {
"post": {
"tags": [
"external-v2"
],
"summary": "messageAcknowledgment",
"description": "Service to acknowledge message consumption by a consumer",
"operationId": "messageAcknowledgmentUsingPOST",
"parameters": [
{
"name": "productId",
"in": "path",
"description": "Product's unique identifier",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "messageId",
"in": "path",
"description": "Kafka message unique identifier",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "status",
"in": "path",
"description": "Kafka message consumption acknowledgment status",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"enum": [
"ACK",
"NACK"
]
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AckPayloadRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerAuth": [
"global"
]
}
]
}
}
},
"components": {
"schemas": {
"AckPayloadRequest": {
"title": "AckPayloadRequest",
"required": [
"message"
],
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Acknowledgment request payload message"
}
}
},
"NotificationCountResult": {
"title": "NotificationCountResult",
"type": "object",
Expand All @@ -123,6 +235,64 @@
"type": "string"
}
}
},
"InvalidParam": {
"title": "InvalidParam",
"required": [
"name",
"reason"
],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Invalid parameter name."
},
"reason": {
"type": "string",
"description": "Invalid parameter reason."
}
}
},
"Problem": {
"title": "Problem",
"required": [
"status",
"title"
],
"type": "object",
"properties": {
"detail": {
"type": "string",
"description": "Human-readable description of this specific problem."
},
"instance": {
"type": "string",
"description": "A URI that descacknoribes where the problem occurred."
},
"invalidParams": {
"type": "array",
"description": "A list of invalid parameters details.",
"items": {
"$ref": "#/components/schemas/InvalidParam"
}
},
"status": {
"type": "integer",
"description": "The HTTP status code.",
"format": "int32",
"example": 500
},
"title": {
"type": "string",
"description": "Short human-readable summary of the problem."
},
"type": {
"type": "string",
"description": "A URL to a page with more details regarding the problem."
}
},
"description": "A \"problem detail\" as a way to carry machine-readable details of errors (https://datatracker.ietf.org/doc/html/rfc7807)"
}
},
"securitySchemes": {
Expand Down

0 comments on commit b139335

Please sign in to comment.