Commit 1ae79621 authored by Dmitry Kniazev's avatar Dmitry Kniazev
Browse files

Updated the OpenAPI model to align with the stream definitions

parent e3621a30
Pipeline #61486 passed with stages
in 4 minutes and 44 seconds
......@@ -8,15 +8,15 @@ info:
servers:
- url: "https://localhost:8080/api/streaming/v1"
tags:
- name: streaming-consumption-api
description: Consumption API
- name: stream-admin-api
description: Stream Admin API
paths:
/consume/streams:
/streams:
get:
summary: "List all registered consumption streams"
summary: "List all registered streams"
operationId: listAllStreams
tags:
- streaming-consumption-api
- stream-admin-api
parameters:
- name: data-partition-id
in: header
......@@ -44,12 +44,12 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
/consume/stream:
/stream:
post:
summary: "Register a new consumption stream"
summary: "Register a new stream"
operationId: createNewStream
tags:
- streaming-consumption-api
- stream-admin-api
parameters:
- name: data-partition-id
in: header
......@@ -62,7 +62,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/StreamDefinition"
$ref: "#/components/schemas/StreamDataset"
responses:
"201":
description: Created
......@@ -81,12 +81,12 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
/consume/stream/{id}:
/stream/{id}:
get:
summary: "Get stream definition by Id"
operationId: getStreamById
tags:
- streaming-consumption-api
- stream-admin-api
parameters:
- name: data-partition-id
in: header
......@@ -99,7 +99,7 @@ paths:
in: path
description: "Stream ID"
required: true
example: "opendes:dataset--Stream.Kafka:4dc4e8ec354e4953b6968fcb1d9d9f38"
example: "opendes:dataset--Stream.Generic:4dc4e8ec354e4953b6968fcb1d9d9f38"
schema:
type: string
responses:
......@@ -125,7 +125,7 @@ paths:
summary: "Delete stream definition by Id and decommision all associated compute resources"
operationId: deleteStreamById
tags:
- streaming-consumption-api
- stream-admin-api
parameters:
- name: data-partition-id
in: header
......@@ -138,7 +138,7 @@ paths:
in: path
description: "Stream ID"
required: true
example: "opendes:dataset--Stream.Kafka:4dc4e8ec354e4953b6968fcb1d9d9f38"
example: "opendes:dataset--Stream.Generic:4dc4e8ec354e4953b6968fcb1d9d9f38"
schema:
type: string
responses:
......@@ -156,12 +156,12 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
/consume/stream/{id}/start:
/stream/{id}/start:
get:
summary: "Start live streaming for the specified stream Id"
operationId: startStreamById
tags:
- streaming-consumption-api
- stream-admin-api
parameters:
- name: data-partition-id
in: header
......@@ -174,7 +174,7 @@ paths:
in: path
description: "Stream ID"
required: true
example: "opendes:dataset--Stream.Kafka:4dc4e8ec354e4953b6968fcb1d9d9f38"
example: "opendes:dataset--Stream.Generic:4dc4e8ec354e4953b6968fcb1d9d9f38"
schema:
type: string
responses:
......@@ -196,12 +196,12 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
/consume/stream/{id}/stop:
/stream/{id}/stop:
get:
summary: "Stop live streaming for the specified stream Id"
operationId: stopStreamById
tags:
- streaming-consumption-api
- stream-admin-api
parameters:
- name: data-partition-id
in: header
......@@ -214,7 +214,7 @@ paths:
in: path
description: "Stream ID"
required: true
example: "opendes:dataset--Stream.Kafka:4dc4e8ec354e4953b6968fcb1d9d9f38"
example: "opendes:dataset--Stream.Generic:4dc4e8ec354e4953b6968fcb1d9d9f38"
schema:
type: string
responses:
......@@ -236,12 +236,12 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
/consume/stream/{id}/info:
/stream/{id}/info:
get:
summary: "Get the current status of the stream by Id"
operationId: getStreamStatusById
tags:
- streaming-consumption-api
- stream-admin-api
parameters:
- name: data-partition-id
in: header
......@@ -254,7 +254,7 @@ paths:
in: path
description: "Stream ID"
required: true
example: "opendes:dataset--Stream.Kafka:4dc4e8ec354e4953b6968fcb1d9d9f38"
example: "opendes:dataset--Stream.Generic:4dc4e8ec354e4953b6968fcb1d9d9f38"
schema:
type: string
responses:
......@@ -291,8 +291,8 @@ components:
properties:
id:
type: string
pattern: '^[\\w\\-\\.]+:dataset\\-\\-Stream.Kafka:[\\w\\-\\.\\:\\%]+'
example: "opendes:dataset--Stream.Kafka:4dc4e8ec354e4953b6968fcb1d9d9f38"
pattern: '^[\\w\\-\\.]+:dataset\\-\\-Stream.Generic:[\\w\\-\\.\\:\\%]+'
example: "opendes:dataset--Stream.Generic:4dc4e8ec354e4953b6968fcb1d9d9f38"
description: "Unique identifier in whole Data Ecosystem. When not provided, Data Ecosystem will create and assign an id to the record."
kind:
type: string
......@@ -323,32 +323,39 @@ components:
ResourceSecurityClassification:
type: string
example: "opendes:reference-data--ResourceSecurityClassification:RESTRICTED:"
ResourceSource:
Source:
type: string
example: "Contoso Inc."
Name:
type: string
example: "Example Well Log Kafka Stream"
Description:
type: string
example: "This stream follows data for one Well Log and routes it from source to sink with no additional filtering"
DatasetProperties:
type: object
properties:
StreamType:
type: string
example: "opendes:reference-data--StreamType:FOLLOW:"
StreamDirection:
type: string
example: "opendes:reference-data--StreamDirection:CONSUME:"
enum:
- source
- processor
- sink
description: 'Type of the stream. Enumeration: "SOURCE", "PROCESSOR", "SINK"'
example: "processor"
StreamDefinition:
$ref: "#/components/schemas/StreamDefinition"
StreamDefinition:
type: object
required:
- SubscribeIDs
- Description
properties:
SourceTopics:
SourceBindings:
type: array
items:
type: string
example: "opendes_wks_work-product-component--WellLog_1.0.0"
SinkTopics:
SinkBindings:
type: array
items:
type: string
......@@ -364,9 +371,6 @@ components:
Aggregate:
type: string
example: "TBD"
Description:
type: string
example: "This stream provides live unmodified well log data for app 1"
StreamStatus:
type: object
properties:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment