Skip to content

Commit

Permalink
fix: update playbook schema
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Dec 24, 2024
1 parent a0ba6cc commit d391ba3
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1,016 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ migrate-test: hack/migrate/go.mod
cd hack/migrate && go run ./main.go

cp-playbook-schema:
cp ../mission-control/config/schemas/playbook-spec.schema.json schema/
cp ../mission-control/config/schemas/playbook-spec.schema.json schema/openapi/

fmt_json:
ls fixtures/expectations/*.json | while read -r jf; do \
Expand Down
82 changes: 76 additions & 6 deletions schema/openapi/playbook-spec.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,61 @@
"$id": "https://github.com/flanksource/incident-commander/api/v1/playbook-spec",
"$ref": "#/$defs/PlaybookSpec",
"$defs": {
"AIAction": {
"properties": {
"apiKey": {
"$ref": "#/$defs/EnvVar"
},
"backend": {
"type": "string"
},
"model": {
"type": "string"
},
"prompt": {
"type": "string"
},
"config": {
"type": "string"
},
"changes": {
"$ref": "#/$defs/TimeMetadata"
},
"analysis": {
"$ref": "#/$defs/TimeMetadata"
},
"relationships": {
"$ref": "#/$defs/AIActionRelationship"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"apiKey",
"prompt",
"config"
]
},
"AIActionRelationship": {
"properties": {
"depth": {
"type": "integer"
},
"changes": {
"$ref": "#/$defs/TimeMetadata"
},
"analysis": {
"$ref": "#/$defs/TimeMetadata"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"depth",
"changes",
"analysis"
]
},
"AWSConnection": {
"properties": {
"connection": {
Expand Down Expand Up @@ -582,6 +637,9 @@
"templatesOn": {
"type": "string"
},
"ai": {
"$ref": "#/$defs/AIAction"
},
"exec": {
"$ref": "#/$defs/ExecAction"
},
Expand Down Expand Up @@ -943,12 +1001,6 @@
"namespace": {
"type": "string"
},
"types": {
"$ref": "#/$defs/Items"
},
"statuses": {
"$ref": "#/$defs/Items"
},
"tagSelector": {
"type": "string"
},
Expand All @@ -957,6 +1009,12 @@
},
"fieldSelector": {
"type": "string"
},
"types": {
"$ref": "#/$defs/Items"
},
"statuses": {
"$ref": "#/$defs/Items"
}
},
"additionalProperties": false,
Expand Down Expand Up @@ -1004,6 +1062,18 @@
"required": [
"key"
]
},
"TimeMetadata": {
"properties": {
"since": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"since"
]
}
}
}
Loading

0 comments on commit d391ba3

Please sign in to comment.