Skip to content

Commit

Permalink
fix-172
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Mendoza Pérez <[email protected]>
  • Loading branch information
antmendoza committed Jan 28, 2023
1 parent e7c68be commit 0451279
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,21 @@ You can convert it to its string representation in JSON or YAML format
by using the static methods `Workflow.toJson` or `Workflow.toYaml` respectively:

```typescript
import { Workflow } from '../src/lib/definitions/workflow';
import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript";

const workflowAsJson: string = Workflow.toJson(workflow);
const workflow: Specification.Workflow = workflowBuilder()
//...
.build()

const workflowAsJson: string = Specification.Workflow.toJson(workflow);
```

```typescript
import { Workflow } from '../src/lib/definitions/workflow';
import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript";

const workflow: Specification.Workflow = workflowBuilder()
//...
.build()

const workflowAsYaml: string = Workflow.toYaml(workflow);
```
Expand Down

0 comments on commit 0451279

Please sign in to comment.