mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
chore: improve openapi.yaml (#5841)
* fix schema * update openpi-deref.yaml * update openapi-deref.json * add openapi-generator-cli in flake.nix * add GH action * fix HubScriptKind * fix errors
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
name: Validate OpenAPI Spec
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'backend/windmill-api/openapi*'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'backend/windmill-api/openapi*'
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install openapi-generator-cli
|
||||
run: npm install @openapitools/openapi-generator-cli -g
|
||||
|
||||
- name: Validate openapi.yaml
|
||||
run: npx @openapitools/openapi-generator-cli validate -i backend/windmill-api/openapi.yaml
|
||||
|
||||
- name: Validate openapi-deref.json
|
||||
run: npx @openapitools/openapi-generator-cli validate -i backend/windmill-api/openapi-deref.json
|
||||
|
||||
# Does not work well with dereferenced yaml
|
||||
# - name: Validate openapi-deref.yaml
|
||||
# run: npx @openapitools/openapi-generator-cli validate -i backend/windmill-api/openapi-deref.yaml
|
||||
|
||||
+6693
-362
File diff suppressed because it is too large
Load Diff
+6020
-1309
File diff suppressed because it is too large
Load Diff
@@ -4896,8 +4896,6 @@ paths:
|
||||
description: Script version/hash
|
||||
content:
|
||||
application/json:
|
||||
required: false
|
||||
|
||||
schema:
|
||||
$ref: "#/components/schemas/ScriptHistory"
|
||||
|
||||
@@ -5459,8 +5457,6 @@ paths:
|
||||
description: Flow version
|
||||
content:
|
||||
application/json:
|
||||
required: false
|
||||
|
||||
schema:
|
||||
$ref: "#/components/schemas/FlowVersion"
|
||||
|
||||
@@ -5490,8 +5486,7 @@ paths:
|
||||
operationId: getFlowVersion
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/WorkspaceId"
|
||||
- type: string
|
||||
name: version
|
||||
- name: version
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
@@ -5513,8 +5508,7 @@ paths:
|
||||
operationId: updateFlowHistory
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/WorkspaceId"
|
||||
- type: string
|
||||
name: version
|
||||
- name: version
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
@@ -6142,10 +6136,8 @@ paths:
|
||||
description: App version
|
||||
content:
|
||||
application/json:
|
||||
required: false
|
||||
schema:
|
||||
$ref: "#/components/schemas/AppHistory"
|
||||
|
||||
/w/{workspace}/apps/list_paths_from_workspace_runnable/{runnable_kind}/{path}:
|
||||
get:
|
||||
summary: list app paths from workspace runnable
|
||||
@@ -6734,11 +6726,6 @@ paths:
|
||||
responses:
|
||||
"201":
|
||||
description: stream of created job uuids separated by \n. Lines may start with 'Error:'
|
||||
example: |
|
||||
a1a74c0d-708e-4539-9768-e8b3d37996bd
|
||||
f0949132-5b30-48fe-bac8-873f047df810
|
||||
Error: Could not re-run 0b885808-ae89-4458-af95-c1ca3a13b0a5
|
||||
52b9c01d-1125-4bbb-8bee-d41f26b70066
|
||||
content:
|
||||
text/event-stream:
|
||||
schema:
|
||||
@@ -7595,7 +7582,8 @@ paths:
|
||||
description: job log
|
||||
content:
|
||||
text/plain:
|
||||
type: string
|
||||
schema:
|
||||
type: string
|
||||
|
||||
/w/{workspace}/jobs_u/get_flow_debug_info/{id}:
|
||||
get:
|
||||
@@ -12472,7 +12460,6 @@ paths:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
|
||||
/concurrency_groups/list:
|
||||
get:
|
||||
summary: List all concurrency groups
|
||||
@@ -13178,7 +13165,47 @@ components:
|
||||
enum: [script, flow]
|
||||
|
||||
schemas:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas"
|
||||
# NOTE: Not so many generators and validators support this format:
|
||||
# $ref: "../../openflow.openapi.yaml#/components/schemas"
|
||||
# This is why it is better to inline each of schemas for better compat
|
||||
OpenFlow:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/OpenFlow"
|
||||
FlowValue:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/FlowValue"
|
||||
Retry:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/Retry"
|
||||
StopAfterIf:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/StopAfterIf"
|
||||
FlowModule:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/FlowModule"
|
||||
InputTransform:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/InputTransform"
|
||||
StaticTransform:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/StaticTransform"
|
||||
JavascriptTransform:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/JavascriptTransform"
|
||||
FlowModuleValue:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/FlowModuleValue"
|
||||
RawScript:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/RawScript"
|
||||
PathScript:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/PathScript"
|
||||
PathFlow:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/PathFlow"
|
||||
ForloopFlow:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/ForloopFlow"
|
||||
WhileloopFlow:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/WhileloopFlow"
|
||||
BranchOne:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/BranchOne"
|
||||
BranchAll:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/BranchAll"
|
||||
Identity:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/Identity"
|
||||
FlowStatus:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/FlowStatus"
|
||||
FlowStatusModule:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/FlowStatusModule"
|
||||
|
||||
AIProvider:
|
||||
type: string
|
||||
@@ -16228,10 +16255,8 @@ components:
|
||||
- access_token
|
||||
|
||||
HubScriptKind:
|
||||
name: kind
|
||||
schema:
|
||||
type: string
|
||||
enum: [script, failure, trigger, approval]
|
||||
type: string
|
||||
enum: [script, failure, trigger, approval]
|
||||
|
||||
PolarsClientKwargs:
|
||||
type: object
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
sqlx-cli
|
||||
sccache
|
||||
nsjail
|
||||
openapi-generator-cli
|
||||
|
||||
# Python
|
||||
flock
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
type RawScript,
|
||||
type InputTransform,
|
||||
type TriggersCount,
|
||||
CaptureService
|
||||
CaptureService,
|
||||
|
||||
type HubScriptKind
|
||||
|
||||
} from '$lib/gen'
|
||||
import { initHistory, push, redo, undo } from '$lib/history'
|
||||
import {
|
||||
@@ -722,7 +725,7 @@
|
||||
$copilotModulesStore[idx].hubCompletions = scripts as {
|
||||
path: string
|
||||
summary: string
|
||||
kind: string
|
||||
kind: HubScriptKind
|
||||
app: string
|
||||
ask_id: number
|
||||
id: number
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
ScriptService,
|
||||
type FlowModule,
|
||||
type HubScriptKind,
|
||||
type InputTransform,
|
||||
type PathScript,
|
||||
type RawScript,
|
||||
@@ -22,7 +23,7 @@ export type FlowCopilotModule = {
|
||||
hubCompletions: {
|
||||
path: string
|
||||
summary: string
|
||||
kind: string
|
||||
kind: HubScriptKind
|
||||
app: string
|
||||
ask_id: number
|
||||
id: number
|
||||
|
||||
Reference in New Issue
Block a user