Skip to content

Commit b31ce2c

Browse files
authored
feat(javascript): add discover handlers to source model (#2096)
1 parent 06451f2 commit b31ce2c

File tree

5 files changed

+84
-0
lines changed

5 files changed

+84
-0
lines changed

specs/ingestion/common/schemas/source.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,3 +349,7 @@ SourceUpdateInput:
349349
- $ref: '#/SourceCSV'
350350
- $ref: '#/SourceBigQuery'
351351
- $ref: '#/SourceUpdateDocker'
352+
353+
DockerSourceStream:
354+
type: object
355+
description: A stream definition (see Singer specification for details).
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
get:
2+
tags:
3+
- sources
4+
summary: Retrieve a stream listing.
5+
description: Retrieve a stream listing for a given Singer specification compatible docker type source ID.
6+
operationId: getDockerSourceStreams
7+
parameters:
8+
- $ref: '../../common/parameters.yml#/pathSourceID'
9+
responses:
10+
'200':
11+
description: OK
12+
content:
13+
application/json:
14+
schema:
15+
title: dockerSourceStreams
16+
type: object
17+
additionalProperties: false
18+
properties:
19+
streams:
20+
type: array
21+
items:
22+
$ref: '../../common/schemas/source.yml#/DockerSourceStream'
23+
required:
24+
- streams
25+
'400':
26+
$ref: '../../../common/responses/BadRequest.yml'
27+
28+
post:
29+
tags:
30+
- sources
31+
summary: Trigger a stream listing request.
32+
description: Trigger a stream listing request for a Singer specification compatible docker type source.
33+
operationId: triggerDockerSourceDiscover
34+
parameters:
35+
- $ref: '../../common/parameters.yml#/pathSourceID'
36+
responses:
37+
'200':
38+
description: OK
39+
content:
40+
application/json:
41+
schema:
42+
title: dockerSourceDiscover
43+
type: object
44+
additionalProperties: false
45+
properties:
46+
runID:
47+
$ref: '../../common/schemas/common.yml#/runID'
48+
createdAt:
49+
$ref: '../../common/schemas/common.yml#/createdAt'
50+
required:
51+
- runID
52+
- createdAt
53+
'400':
54+
$ref: '../../../common/responses/BadRequest.yml'

specs/ingestion/spec.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ paths:
6666
$ref: 'paths/sources/searchSources.yml'
6767
/1/sources/{sourceID}:
6868
$ref: 'paths/sources/sourceID.yml'
69+
/1/sources/{sourceID}/discover:
70+
$ref: 'paths/sources/discover.yml'
6971

7072
# tasks API.
7173
/1/tasks:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"testName": "getDockerSourceStreams",
4+
"parameters": {
5+
"sourceID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
6+
},
7+
"request": {
8+
"path": "/1/sources/6c02aeb1-775e-418e-870b-1faccd4b2c0f/discover",
9+
"method": "GET"
10+
}
11+
}
12+
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"testName": "triggerDockerSourceDiscover",
4+
"parameters": {
5+
"sourceID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
6+
},
7+
"request": {
8+
"path": "/1/sources/6c02aeb1-775e-418e-870b-1faccd4b2c0f/discover",
9+
"method": "POST"
10+
}
11+
}
12+
]

0 commit comments

Comments
 (0)