Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

JSON generated from One Of is broken in Refract #288

Closed
honzajavorek opened this issue Apr 11, 2016 · 2 comments
Closed

JSON generated from One Of is broken in Refract #288

honzajavorek opened this issue Apr 11, 2016 · 2 comments
Labels

Comments

@honzajavorek
Copy link
Contributor

Hello gentlemen, Dredd user reports problems with One Of in apiaryio/dredd#439. Sample blueprint:

# GET /
+ Response 200 (application/json)
    + Attributes (jsonTaskBase)

# Data Structures
## jsonTaskBase (object)
+ recurrence (jsonRecurrence)

## jsonRecurrence (object)
+ One of
    + numberOfOccurences: 5 (number)
    + endDate: `2015-04-08T12:30:00Z` (string)
+ One of
    + month: `march` (string)
    + interval: 1 (number)

Output:

{
  "recurrence": {
    "": [
      [
        "march"
      ],
      [
        1
      ]
    ]
  }
}

Expected output:

{
  "recurrence": {
    "numberOfOccurences": 5,
    "month": "march"
  }
}
@klokane
Copy link
Contributor

klokane commented Apr 11, 2016

seems to be #200 related

@pksunkara
Copy link
Contributor

Fixed by #307

@w-vi w-vi reopened this Apr 30, 2016
@w-vi w-vi closed this as completed Apr 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants