Skip to content

Commit 5459179

Browse files
phixMePeter Hickswslulciuc
authored
Add operationId to openapi spec (#1978)
* Adds `operationId` to Marquez endpoints for client generation purposes. Signed-off-by: Peter Hicks <peter@datakin.com> * Code Review feedback. Signed-off-by: Peter Hicks <peter@datakin.com> Co-authored-by: Peter Hicks <peter@datakin.com> Co-authored-by: Willy Lulciuc <willy@datakin.com>
1 parent 47cb6f9 commit 5459179

2 files changed

Lines changed: 744 additions & 2320 deletions

File tree

docs/openapi.html

Lines changed: 714 additions & 2320 deletions
Large diffs are not rendered by default.

spec/openapi.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ paths:
1717
parameters:
1818
- $ref: '#/components/parameters/namespace'
1919
put:
20+
operationId: putNamespace
2021
summary: Create a namespace
2122
description: Creates a new namespace object. A namespace enables the contextual grouping of related
2223
jobs and datasets. Namespaces must contain only letters (`a-z`, `A-Z`), numbers (`0-9`),
@@ -38,6 +39,7 @@ paths:
3839
schema:
3940
$ref: '#/components/schemas/Namespace'
4041
get:
42+
operationId: getNamespace
4143
summary: Retrieve a namespace
4244
description: Returns a namespace.
4345
tags:
@@ -52,6 +54,7 @@ paths:
5254

5355
/namespaces:
5456
get:
57+
operationId: getNamespaces
5558
parameters:
5659
- $ref: '#/components/parameters/limit'
5760
- $ref: '#/components/parameters/offset'
@@ -71,6 +74,7 @@ paths:
7174
parameters:
7275
- $ref: '#/components/parameters/source'
7376
put:
77+
operationId: putSource
7478
summary: Create a source
7579
description: Creates a new source object. A source is the physical location of a dataset such as
7680
a table in PostgreSQL, or topic in Kafka. A source enables the grouping of physical datasets
@@ -91,6 +95,7 @@ paths:
9195
schema:
9296
$ref: '#/components/schemas/Source'
9397
get:
98+
operationId: getSource
9499
summary: Retrieve a source
95100
description: Returns a source.
96101
tags:
@@ -105,6 +110,7 @@ paths:
105110

106111
/sources:
107112
get:
113+
operationId: getSources
108114
parameters:
109115
- $ref: '#/components/parameters/limit'
110116
- $ref: '#/components/parameters/offset'
@@ -125,6 +131,7 @@ paths:
125131
- $ref: '#/components/parameters/namespace'
126132
- $ref: '#/components/parameters/dataset'
127133
put:
134+
operationId: putDataset
128135
summary: Create a dataset
129136
description: Creates a new dataset.
130137
deprecated: true
@@ -145,6 +152,7 @@ paths:
145152
schema:
146153
$ref: '#/components/schemas/Dataset'
147154
get:
155+
operationId: getDataset
148156
summary: Retrieve a dataset
149157
description: Returns a dataset.
150158
tags:
@@ -163,6 +171,7 @@ paths:
163171
- $ref: '#/components/parameters/dataset'
164172
- $ref: '#/components/parameters/version'
165173
get:
174+
operationId: getDatasetVersion
166175
summary: Retrieve a version for a dataset
167176
description: Returns a version for a dataset.
168177
tags:
@@ -180,6 +189,7 @@ paths:
180189
- $ref: '#/components/parameters/namespace'
181190
- $ref: '#/components/parameters/dataset'
182191
get:
192+
operationId: getDatasetVersions
183193
summary: List all versions for a dataset
184194
description: Returns a list of versions for a dataset.
185195
tags:
@@ -197,6 +207,7 @@ paths:
197207
- $ref: '#/components/parameters/namespace'
198208
- $ref: '#/components/parameters/dataset'
199209
get:
210+
operationId: getDatasets
200211
parameters:
201212
- $ref: '#/components/parameters/limit'
202213
- $ref: '#/components/parameters/offset'
@@ -218,6 +229,7 @@ paths:
218229
- $ref: '#/components/parameters/dataset'
219230
- $ref: '#/components/parameters/tag'
220231
post:
232+
operationId: addTagToDataset
221233
summary: Tag a dataset
222234
description: Tag an existing dataset.
223235
tags:
@@ -237,6 +249,7 @@ paths:
237249
- $ref: '#/components/parameters/field'
238250
- $ref: '#/components/parameters/tag'
239251
post:
252+
operationId: addTagToFieldOfDataset
240253
summary: Tag a field
241254
description: Tag an existing field of a dataset.
242255
tags:
@@ -254,6 +267,7 @@ paths:
254267
- $ref: '#/components/parameters/namespace'
255268
- $ref: '#/components/parameters/job'
256269
put:
270+
operationId: putJob
257271
summary: Create a job
258272
description: Creates a new job object. All job objects are immutable and are uniquely identified by a generated ID.
259273
Marquez will create a version of a job each time the contents of the object is modified. For example, the `location`
@@ -275,6 +289,7 @@ paths:
275289
schema:
276290
$ref: '#/components/schemas/Job'
277291
get:
292+
operationId: getJob
278293
summary: Retrieve a job
279294
description: Retrieve a job.
280295
tags:
@@ -291,6 +306,7 @@ paths:
291306
parameters:
292307
- $ref: '#/components/parameters/namespace'
293308
get:
309+
operationId: getJobs
294310
parameters:
295311
- $ref: '#/components/parameters/limit'
296312
- $ref: '#/components/parameters/offset'
@@ -312,6 +328,7 @@ paths:
312328
- $ref: '#/components/parameters/job'
313329
- $ref: '#/components/parameters/version'
314330
get:
331+
operationId: getJobVersion
315332
summary: Retrieve a version for a job
316333
description: Returns a version for a job.
317334
tags:
@@ -329,6 +346,7 @@ paths:
329346
- $ref: '#/components/parameters/namespace'
330347
- $ref: '#/components/parameters/job'
331348
get:
349+
operationId: getJobVersions
332350
summary: List all versions for a job
333351
description: Returns a list of versions for a job.
334352
tags:
@@ -346,6 +364,7 @@ paths:
346364
- $ref: '#/components/parameters/namespace'
347365
- $ref: '#/components/parameters/job'
348366
post:
367+
operationId: createRun
349368
summary: Create a run
350369
description: Creates a new run object for a job.
351370
deprecated: true
@@ -364,6 +383,7 @@ paths:
364383
schema:
365384
$ref: '#/components/schemas/Run'
366385
get:
386+
operationId: getRuns
367387
parameters:
368388
- $ref: '#/components/parameters/limit'
369389
- $ref: '#/components/parameters/offset'
@@ -383,6 +403,7 @@ paths:
383403
parameters:
384404
- $ref: '#/components/parameters/runId'
385405
get:
406+
operationId: getRun
386407
summary: Retrieve a run
387408
description: Retrieve a run.
388409
tags:
@@ -400,6 +421,7 @@ paths:
400421
- $ref: '#/components/parameters/runId'
401422
- $ref: '#/components/parameters/at'
402423
post:
424+
operationId: startRun
403425
summary: Start a run
404426
description: Marks the run as `RUNNING`.
405427
deprecated: true
@@ -418,6 +440,7 @@ paths:
418440
- $ref: '#/components/parameters/runId'
419441
- $ref: '#/components/parameters/at'
420442
post:
443+
operationId: completeRun
421444
summary: Complete a run
422445
description: Marks the run as `COMPLETED`.
423446
deprecated: true
@@ -436,6 +459,7 @@ paths:
436459
- $ref: '#/components/parameters/runId'
437460
- $ref: '#/components/parameters/at'
438461
post:
462+
operationId: failRun
439463
summary: Fail a run
440464
description: Marks the run as `FAILED`.
441465
deprecated: true
@@ -454,6 +478,7 @@ paths:
454478
- $ref: '#/components/parameters/runId'
455479
- $ref: '#/components/parameters/at'
456480
post:
481+
operationId: abortRun
457482
summary: Abort a run
458483
description: Marks the run as `ABORTED`.
459484
deprecated: true
@@ -469,6 +494,7 @@ paths:
469494

470495
/lineage:
471496
post:
497+
operationId: recordLineage
472498
summary: Record a single lineage event
473499
description: Receive, process, and store lineage metadata using the [OpenLineage](https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json) standard.
474500
tags:
@@ -482,6 +508,7 @@ paths:
482508
'200':
483509
description: OK
484510
get:
511+
operationId: getLineage
485512
parameters:
486513
- $ref: '#/components/parameters/nodeId'
487514
- $ref: '#/components/parameters/depth'
@@ -500,6 +527,7 @@ paths:
500527
parameters:
501528
- $ref: '#/components/parameters/tag'
502529
put:
530+
operationId: putTag
503531
summary: Create a tag
504532
description: Creates a new tag object.
505533
tags:
@@ -519,6 +547,7 @@ paths:
519547

520548
/tags:
521549
get:
550+
operationId: getTags
522551
parameters:
523552
- $ref: '#/components/parameters/limit'
524553
- $ref: '#/components/parameters/offset'
@@ -536,6 +565,7 @@ paths:
536565

537566
/search:
538567
get:
568+
operationId: search
539569
parameters:
540570
- $ref: '#/components/parameters/q'
541571
- $ref: '#/components/parameters/filter'

0 commit comments

Comments
 (0)