feat(schema): annotated WDL schema, as JSON and YAML - #1
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
definitionssection, everything inlined throughallOf/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:
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/workflowdefinition.schema.jsonworkflowdefinition.annotated.schema.jsonworkflowdefinition.annotated.schema.yamlannotations.yamlgenerate.pyREADME.mdThe 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.
retry-policy-type-casingNone/Fixed/Exponential; designer and every example emit lowercaseauthentication-managed-identityauthenticationunion has noManagedServiceIdentitybranch, the recommended auth for an Http action calling Azureretry-policy-count-expressioncounttypedinteger, rejecting"@parameters('retry_count')"; any WDL value may be an expression stringvariable-type-casingInitializeVariable/SetVariabletypes PascalCase upstream, lowercase in practiceinitialize-variable-multiplevariablescapped atmaxItems: 1; a portal export from a live workflow carries threeEach is recorded in
x-annotation.correctionswith pointer, reason and count, and called out in thedescriptionat the node it changed. They should be reported upstream and deleted when fixed.Verification
YAML output == JSON output(parsed and compared)Draft4Validator.check_schemagenerate.py --checkis a clean drift gateNote
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.