Skip to content

feat(schema): annotated WDL schema, as JSON and YAML - #1

Merged
craigthackerx merged 1 commit into
mainfrom
feat/annotated-wdl-schema
Aug 24, 2026
Merged

feat(schema): annotated WDL schema, as JSON and YAML#1
craigthackerx merged 1 commit into
mainfrom
feat/annotated-wdl-schema

Conversation

@craigthackerx

Copy link
Copy Markdown
Contributor

Adds schema/: the Azure Logic Apps workflow definition schema (2016-06-01) with annotations and corrections, published as both JSON and YAML.

Why

The published schema is machine generated: 147 KB, no definitions section, everything inlined through allOf/oneOf, and descriptions like "The flow triggers." that restate the property name. It validates a definition but does not teach one, and it says nothing about the behaviours that pass validation and then fail at run time.

It also rejects definitions Azure itself emits:

Whole definitions validating cleanly
upstream schema 13 of 35
this schema 35 of 35

Measured against the 87 workflow definitions in the workspace, including this module's own examples, the azure-soc and az-socv5 SOAR estates.

What is in schema/

File What it is
workflowdefinition.schema.json upstream, committed so a rebuild needs no network
workflowdefinition.annotated.schema.json the deliverable
workflowdefinition.annotated.schema.yaml the same document in YAML, annotations as literal blocks
annotations.yaml 21 notes and 5 corrections, hand authored, the only file to edit
generate.py fetches upstream, applies both layers, writes both outputs
README.md how to point an editor at it, how to validate in CI, how to regenerate

The corrections

Each was found by validating real definitions, not by reading. Each widens what is accepted; none makes the schema stricter. Occurrences are how many real actions upstream rejected.

Correction Occ. What upstream gets wrong
retry-policy-type-casing 39 enum is None/Fixed/Exponential; designer and every example emit lowercase
authentication-managed-identity 28 the authentication union has no ManagedServiceIdentity branch, the recommended auth for an Http action calling Azure
retry-policy-count-expression 5 count typed integer, rejecting "@parameters('retry_count')"; any WDL value may be an expression string
variable-type-casing 3 InitializeVariable/SetVariable types PascalCase upstream, lowercase in practice
initialize-variable-multiple 1 variables capped at maxItems: 1; a portal export from a live workflow carries three

Each is recorded in x-annotation.corrections with pointer, reason and count, and called out in the description at the node it changed. They should be reported upstream and deleted when fixed.

Verification

  • YAML output == JSON output (parsed and compared)
  • the annotated schema passes Draft4Validator.check_schema
  • 35/35 whole definitions validate, from both the JSON and the YAML file
  • generate.py --check is a clean drift gate
  • every annotation and correction pointer is asserted to resolve, so an upstream reshape fails the build

Note

The YAML is the schema in YAML, for readability and for tools that accept a YAML schema. A workflow definition itself is JSON: WDL has no YAML dialect, and the schema now says so where someone will read it.

The published 2016-06-01 workflow definition schema is machine generated:
147 KB, no definitions section, everything inlined through allOf/oneOf,
and descriptions that restate the property name. It validates a
definition but does not teach one, and says nothing about the behaviours
that pass validation and fail at run time.

It also rejects definitions Azure itself emits. Validating the 87
workflow definitions in this workspace against it, only 13 of the 35
whole definitions pass. Against this schema, all 35 do.

schema/ holds the upstream copy, a hand authored annotations.yaml, a
generator, and the two outputs. The generator merges 21 notes into the
descriptions and applies 5 corrections, then writes the result as both
JSON and YAML. Every pointer is asserted to resolve, so an upstream
reshape fails loudly rather than dropping notes.

The corrections, each found by validating real definitions rather than
by reading, and each widening what is accepted:

- retryPolicy.type enum is PascalCase upstream, lowercase in practice
  (39 real actions rejected)
- the authentication union has no ManagedServiceIdentity branch, which
  is the recommended auth for an Http action calling Azure (28)
- retryPolicy.count is typed integer, rejecting an expression (5)
- InitializeVariable and SetVariable types are PascalCase upstream (3)
- InitializeVariable caps variables at maxItems 1, but a portal export
  from a live workflow carries three (1)

The YAML is the SCHEMA in YAML, for readability and for tools that take
a YAML schema. A workflow definition is still JSON: WDL has no YAML
dialect, and the schema says so where someone will read it.
@craigthackerx
craigthackerx merged commit 07d32f3 into main Aug 24, 2026
2 checks passed
@craigthackerx
craigthackerx deleted the feat/annotated-wdl-schema branch August 24, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant