Skip to content

Commit

Permalink
Update OpenAPI Specification (#8)
Browse files Browse the repository at this point in the history
* Update OpenAPI Specification (api.json)

* add operation ids

* Regenerate SDKs

---------

Co-authored-by: konfig-bot[bot] <121480725+konfig-bot[bot]@users.noreply.github.com>
Co-authored-by: eddiechayes <[email protected]>
Co-authored-by: konfig-publisher <[email protected]>
  • Loading branch information
3 people authored Mar 12, 2024
1 parent f36a94a commit a510019
Show file tree
Hide file tree
Showing 72 changed files with 4,308 additions and 368 deletions.
6 changes: 6 additions & 0 deletions .konfig/changesets/sad-paths-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
python: patch
typescript: patch
---

Regenerate SDKs
4 changes: 4 additions & 0 deletions .konfig/progress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ examples_2: {}
examples_3: {}
fixOnlyOneTagName: false
operationIds:
/v1/runs/bulk:
post: BulkWorkflowRuns_runBulk
/v1/runs/bulk/{bulk_run_id}:
get: BulkWorkflowRuns_getBulk
/v1/runs/{workflow_run_id}:
get: WorkflowRuns_getWorkflowRun
operationTags: {}
Expand Down
6 changes: 3 additions & 3 deletions STATISTICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

| SDK Name | Lines of Code |
| -------- | ------------- |
| python | 11906 |
| typescript | 8370 |
| **Total** | 20276 |
| python | 14981 |
| typescript | 8883 |
| **Total** | 23864 |
207 changes: 189 additions & 18 deletions api-fixed.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
{
"description": "Endpoints related to workflow run operations",
"name": "Workflow Runs"
},
{
"description": "Endpoints related to bulk workflow run operations",
"name": "Bulk Workflow Runs"
}
],
"paths": {
Expand All @@ -45,7 +49,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunWorkflowDto"
"$ref": "#/components/schemas/RunWorkflowSchema"
}
}
}
Expand All @@ -56,7 +60,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowRunEntity"
"$ref": "#/components/schemas/WorkflowRunSchema"
}
}
}
Expand Down Expand Up @@ -99,7 +103,93 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowRunEntity"
"$ref": "#/components/schemas/WorkflowRunSchema"
}
}
}
},
"401": {
"description": "Unauthorized."
}
}
}
},
"/v1/runs/bulk": {
"post": {
"tags": [
"Bulk Workflow Runs"
],
"summary": "Run a workflow in bulk",
"operationId": "BulkWorkflowRuns_runBulk",
"security": [
{
"api_key": [
]
}
],
"description": "This endpoint lets the user run a specified workflow with the provided csv in bulk.",
"parameters": [
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunBulkWorkflowSchema"
}
}
}
},
"responses": {
"200": {
"description": "The bulk workflow run has been successfully initiated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkRunSchema"
}
}
}
},
"401": {
"description": "Unauthorized."
}
}
}
},
"/v1/runs/bulk/{bulk_run_id}": {
"get": {
"tags": [
"Bulk Workflow Runs"
],
"summary": "Get a bulk workflow run",
"operationId": "BulkWorkflowRuns_getBulk",
"security": [
{
"api_key": [
]
}
],
"description": "This endpoint retrieves the details of a specific bulk workflow run using its `bulk_run_id`.",
"parameters": [
{
"description": "The ID of the bulk run to retrieve.",
"name": "bulk_run_id",
"required": true,
"in": "path",
"example": "bulk_9Nmenl7rxIu2FiSsnqNyTe9G",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The bulk run details have been successfully retrieved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkRunSchema"
}
}
}
Expand All @@ -120,7 +210,7 @@
}
},
"schemas": {
"RunWorkflowDto": {
"RunWorkflowSchema": {
"type": "object",
"properties": {
"workflow_id": {
Expand Down Expand Up @@ -148,16 +238,14 @@
"workflow_id"
]
},
"WorkflowRunEntity": {
"WorkflowRunSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
"type": "string"
},
"version_id": {
"type": "string",
"format": "uuid"
"type": "string"
},
"status": {
"type": "string",
Expand All @@ -168,30 +256,35 @@
]
},
"created_at": {
"type": "string",
"format": "date-time"
"type": "string"
},
"started_at": {
"type": "string",
"format": "date-time"
"nullable": true,
"default": null
},
"ended_at": {
"type": "string",
"format": "date-time"
"nullable": true,
"default": null
},
"workflow_id": {
"type": "string",
"format": "uuid"
"type": "string"
},
"error": {
"type": "string",
"format": "string"
"nullable": true,
"default": null
},
"input": {
"type": "object"
"type": "object",
"nullable": true,
"default": null
},
"output": {
"type": "object"
"type": "object",
"nullable": true,
"default": null
}
},
"required": [
Expand All @@ -206,6 +299,84 @@
"input",
"output"
]
},
"RunBulkWorkflowSchema": {
"type": "object",
"properties": {
"workflow_id": {
"description": "The ID of the workflow to be run in bulk.",
"type": "string",
"format": "",
"example": "wkf_i3F5UjpZ2Vg"
},
"input_csv_url": {
"description": "A CSV file containing the input data for the bulk run. Each row should contain the input data for a single run.",
"type": "string",
"format": "",
"example": "https://myapp.com/input.csv"
},
"webhook_url": {
"description": "The URL to which the bulk run results should be sent to on completion.",
"type": "string",
"example": "https://myapp.com/webhook"
}
},
"required": [
"workflow_id",
"input_csv_url"
]
},
"BulkRunSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"version_id": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"completed",
"running",
"failed"
]
},
"created_at": {
"type": "string"
},
"workflow_id": {
"type": "string"
},
"input_csv_url": {
"type": "string"
},
"output_csv_url": {
"type": "string",
"nullable": true,
"default": null
},
"error": {
"type": "string",
"nullable": true,
"default": null
},
"row_count": {
"type": "number"
}
},
"required": [
"id",
"version_id",
"status",
"created_at",
"workflow_id",
"input_csv_url",
"output_csv_url",
"error",
"row_count"
]
}
}
}
Expand Down
Loading

0 comments on commit a510019

Please sign in to comment.