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

added open api inject to include replay end point #299

Merged
merged 3 commits into from
Apr 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
97 changes: 96 additions & 1 deletion openapi-meta/src/main/resources/config/openapi-inject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,46 @@ info:
version: 1.0.0
title: Light-4j OpenAPI Admin
paths:
'/adm/messagereplaymetadata':
post:
tags:
- "kafka-sidecar"
operationId: TopicReplayMetadataPost
summary: Post message for replay the message from topic
description: Post message for replay the message from topic
requestBody:
description: "Topic message replay metadata object"
required: true
content:
application/json:
schema:
"$ref": "#/components/schemas/TopicReplayMetadata"
parameters:
- $ref: '#/components/parameters/x-traceability-id'
responses:
'200':
description: Successful response
content:
application/json:
schema:
"$ref": "#/components/schemas/ProduceResponse"
'400':
description: Bad Request
content:
application/json:
schema:
"$ref": "#/components/schemas/Status"
'500':
description: Internal Server Error
content:
application/json:
schema:
"$ref": "#/components/schemas/Status"
security:
- admin-scope:
- admin
# for each business to access their own admin endpoints
- ${server.serviceId:com.networknt.placeholder-1.0.0}/admin
/adm/health/${server.serviceId:com.networknt.placeholder-1.0.0}:
parameters:
- name: server.serviceId:com.networknt.placeholder-1.0.0
Expand Down Expand Up @@ -229,4 +269,59 @@ components:
clientCredentials:
tokenUrl: 'https://localhost:6882/token'
scopes:
admin: admin scope to access admin endpoints
"admin": "Grant admin access to light4j components' admin endpoint for this API, api platform team "
"${server.serviceId}/admin": "Grant admin access to light4j components' admin endpoints for this API , API owner"
stevehu marked this conversation as resolved.
Show resolved Hide resolved
parameters:
x-traceability-id:
name: x-traceability-id
description: "Common header parameters for centeralized logging"
in: header
required: true
schema:
$ref: 'https://api.swaggerhub.com/domains/Sun-Life-Financial/EnterpriseCommonComponents/1.4.5#/components/schemas/x-traceability-id'
stevehu marked this conversation as resolved.
Show resolved Hide resolved
schemas:
TopicReplayMetadata:
type: object
properties:
topicName:
type: string
dlqIndicator:
type: string
partition:
type: number
startOffset:
type: number
endOffset:
type: number
consumerGroup:
type: string
timeout:
type: number
streamingApp:
type: boolean
destinationTopic:
type: string
lastRetry:
type: boolean
ProduceResponse:
type: object
properties:
keySchemaId:
type: integer
valueSchemaId:
type: integer
offsets:
type: array
items:
"$ref": "#/components/schemas/PartitionOffset"
PartitionOffset:
type: object
properties:
topic:
type: string
partition:
type: integer
offset:
type: number
metadata:
type: string