Skip to content

wwt/WorkflowSchema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome

This project provides a schema to validate your data driven workflows for SwiftCurrent. You can validate your json using a tool like this online json schema validator.

Examples

The simplest implementation with a FlowRepresentable and its provided name.

JSON

{
  "$schema": "https://raw.githubusercontent.com/wwt/WorkflowSchema/main/workflow-schema.json",
  "schemaVersion": "v0.0.1",
  "sequence": [
    { "flowRepresentableName": "FirstView" },
    { "flowRepresentableName": "SecondView" },
    { "flowRepresentableName": "ThirdView" }
  ]
}

YAML

# yaml-language-server: $schema=https://raw.githubusercontent.com/wwt/WorkflowSchema/main/workflow-schema.json

---
schemaVersion: v0.0.1
sequence:
- flowRepresentableName: FistView
- flowRepresentableName: SecondView
- flowRepresentableName: ThirdView
A more complex implementation that provides an optional `LaunchStyle` and `FlowPersistence`.
{
  "$schema": "https://raw.githubusercontent.com/wwt/WorkflowSchema/main/workflow-schema.json",
  "schemaVersion": "v0.0.1",
  "sequence": [
    {
      "flowRepresentableName": "FirstView",
      "launchStyle": "modal",
      "flowPersistence": "removedAfterProceeding"
    }
  ]
}
An even more complex implementation that includes platform specifications.
{
  "$schema": "https://raw.githubusercontent.com/wwt/WorkflowSchema/main/workflow-schema.json",
  "schemaVersion": "v0.0.1",
  "sequence": [
    {
      "flowRepresentableName": {
        "watchOS": "FR3",
        "macOS": "FR3",
        "iOS": "FR3",
        "iPadOS": "FR3",
        "tvOS": "FR3",
        "android": "FRA3"
      },
      "launchStyle": {
        "watchOS": "modal",
        "macOS": "modal",
        "iOS": "modal",
        "iPadOS": "popover",
        "tvOS": "modal",
        "android": "widget"
      },
      "flowPersistence": {
        "watchOS": "removedAfterProceeding",
        "macOS": "removedAfterProceeding",
        "iOS": "removedAfterProceeding",
        "iPadOS": "removedAfterProceeding",
        "tvOS": "removedAfterProceeding",
        "android": "somethingElse"
      }
    }
  ]
}
An implementation that builds on the platform style, but allows using a wildcard `*` to set a default and provide the ability to override as needed.
{
  "$schema": "https://raw.githubusercontent.com/wwt/WorkflowSchema/main/workflow-schema.json",
  "schemaVersion": "v0.0.1",
  "sequence": [
    {
      "flowRepresentableName": {
        "*": "FR3",
        "android": "FRA3"
      },
      "launchStyle": {
        "*": "modal",
        "iPadOS": "popover",
        "android": "widget"
      },
      "flowPersistence": {
        "*": "removedAfterProceeding",
        "android": "somethingElse"
      }
    }
  ]
}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •