Skip to content

YAML serialization/deserialization fails if there is a number in query http #1558

Description

@fjtirado

This yaml workflow

  document:
  dsl: 1.0.0-alpha2
  namespace: examples
  name: http-query-params
  version: 1.0.0-alpha2
input:
  schema:
    format: json
    document:
      type: object
      required:
        - searchQuery
      properties:
        searchQuery:
          type: string
do:
  - searchStarWarsCharacters:
      call: http
      with:
        method: get
        endpoint: https://swapi.dev/api/people/
        query:
          search: ${.searchQuery}
          number: 1

is not valid according to schema, because query has to be strings.
Therefore the yaml representation of a workflow has to be

  document:
  dsl: 1.0.0-alpha2
  namespace: examples
  name: http-query-params
  version: 1.0.0-alpha2
input:
  schema:
    format: json
    document:
      type: object
      required:
        - searchQuery
      properties:
        searchQuery:
          type: string
do:
  - searchStarWarsCharacters:
      call: http
      with:
        method: get
        endpoint: https://swapi.dev/api/people/
        query:
          search: ${.searchQuery}
          number: "1"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions