Convert all schemas to flat format with inline required/secret
All schemas (parameters, output, output_schema, conf_schema) now use the
StackStorm-style flat format expected by Attune:
{ param_name: { type, description, required, secret, ... } }
Instead of the standard JSON Schema format:
{ type: object, properties: { ... }, required: [...] }
Also fix rule template syntax: trigger.payload.* -> event.payload.*
This commit is contained in:
@@ -19,24 +19,19 @@ parameter_format: json
|
||||
# Output format: json (structured data parsing enabled)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema (standard JSON Schema format)
|
||||
# Action parameters schema (flat format with inline required/secret)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: "Optional name to include in greeting"
|
||||
default: "Python"
|
||||
name:
|
||||
type: string
|
||||
description: "Optional name to include in greeting"
|
||||
default: "Python"
|
||||
|
||||
# Output schema
|
||||
# Output schema (flat format)
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
description: "The greeting message"
|
||||
required:
|
||||
- message
|
||||
message:
|
||||
type: string
|
||||
description: "The greeting message"
|
||||
required: true
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
|
||||
@@ -19,46 +19,45 @@ parameter_format: json
|
||||
# Output format: json (structured data)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema
|
||||
# Action parameters schema (StackStorm-style: inline required/secret per parameter)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: "URL to request (defaults to https://example.com)"
|
||||
default: "https://example.com"
|
||||
method:
|
||||
type: string
|
||||
description: "HTTP method"
|
||||
default: "GET"
|
||||
enum:
|
||||
- GET
|
||||
- POST
|
||||
- PUT
|
||||
- DELETE
|
||||
url:
|
||||
type: string
|
||||
description: "URL to request (defaults to https://example.com)"
|
||||
default: "https://example.com"
|
||||
method:
|
||||
type: string
|
||||
description: "HTTP method"
|
||||
default: "GET"
|
||||
enum:
|
||||
- GET
|
||||
- POST
|
||||
- PUT
|
||||
- DELETE
|
||||
|
||||
# Output schema
|
||||
# Output schema (StackStorm-style flat format)
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
status_code:
|
||||
type: integer
|
||||
description: "HTTP response status code"
|
||||
url:
|
||||
type: string
|
||||
description: "URL that was requested"
|
||||
content_length:
|
||||
type: integer
|
||||
description: "Length of the response body in bytes"
|
||||
content_type:
|
||||
type: string
|
||||
description: "Content-Type header from the response"
|
||||
title:
|
||||
type: string
|
||||
description: "Extracted page title (if HTML response)"
|
||||
success:
|
||||
type: boolean
|
||||
description: "Whether the request succeeded (2xx status)"
|
||||
status_code:
|
||||
type: integer
|
||||
description: "HTTP response status code"
|
||||
required: true
|
||||
url:
|
||||
type: string
|
||||
description: "URL that was requested"
|
||||
required: true
|
||||
content_length:
|
||||
type: integer
|
||||
description: "Length of the response body in bytes"
|
||||
content_type:
|
||||
type: string
|
||||
description: "Content-Type header from the response"
|
||||
title:
|
||||
type: string
|
||||
description: "Extracted page title (if HTML response)"
|
||||
success:
|
||||
type: boolean
|
||||
description: "Whether the request succeeded (2xx status)"
|
||||
required: true
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
|
||||
@@ -19,36 +19,30 @@ parameter_format: json
|
||||
# Output format: json (structured data)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema
|
||||
# Action parameters schema (StackStorm-style: inline required per parameter)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
counter:
|
||||
type: integer
|
||||
description: "The counter value to consume"
|
||||
rule_ref:
|
||||
type: string
|
||||
description: "The rule reference the counter is scoped to"
|
||||
default: ""
|
||||
required:
|
||||
- counter
|
||||
counter:
|
||||
type: integer
|
||||
description: "The counter value to consume"
|
||||
required: true
|
||||
rule_ref:
|
||||
type: string
|
||||
description: "The rule reference the counter is scoped to"
|
||||
default: ""
|
||||
|
||||
# Output schema
|
||||
# Output schema (StackStorm-style: inline required per parameter)
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
description: "Formatted message containing the counter value"
|
||||
counter:
|
||||
type: integer
|
||||
description: "The counter value that was consumed"
|
||||
rule_ref:
|
||||
type: string
|
||||
description: "The rule reference the counter is scoped to"
|
||||
required:
|
||||
- message
|
||||
- counter
|
||||
message:
|
||||
type: string
|
||||
description: "Formatted message containing the counter value"
|
||||
required: true
|
||||
counter:
|
||||
type: integer
|
||||
description: "The counter value that was consumed"
|
||||
required: true
|
||||
rule_ref:
|
||||
type: string
|
||||
description: "The rule reference the counter is scoped to"
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user