Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SELC-5851] Adding acknowledgment to openapi onboarding fn #571

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading