Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling multiple values of properties #43

Closed
tpluscode opened this issue Jul 23, 2019 · 1 comment
Closed

Handling multiple values of properties #43

tpluscode opened this issue Jul 23, 2019 · 1 comment
Labels
Core ⚛️ Related to core grammar

Comments

@tpluscode
Copy link
Member

tpluscode commented Jul 23, 2019

Introduction

A representation property can have multiple values. Obvious example of this are collection resources but it could be anything. Both Link and Property thus need to support that in scenarios.

Proposal

Run all children against every value

My best idea is to keep the current syntax unchanged. If multiple values are found, a runner should simply apply all child steps to all values.

{
  "_links": {
    "friend": [ 
      { "href": "http://example.com/Fred" }, 
      { "href": "http://example.com/Barney" } 
    ]
  }
}

The following scenario would dereference both /Fred and /Barney and check the status code.

# Will dereference
With Link "friend" {
    Expect Status 200
}
@tpluscode tpluscode added the Core ⚛️ Related to core grammar label Jul 23, 2019
@tpluscode
Copy link
Member Author

Closed as of v0.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core ⚛️ Related to core grammar
Projects
None yet
Development

No branches or pull requests

1 participant