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

Drafter aborts while rendering JSON value for a non-object inside an array of objects #682

Closed
kylef opened this issue Apr 10, 2019 · 3 comments
Assignees
Labels

Comments

@kylef
Copy link
Member

kylef commented Apr 10, 2019

The included API Blueprint caused the assertion at

assert(false);
to be hit:

$ ./bin/drafter <document>
Assertion failed: (false), function renderProperty, file ../src/refract/JsonValue.cc, line 95.
fish: './bin/drafter <document>' terminated by signal SIGABRT (Abort)
## GET /

+ Response 200 (application/json)
    + Attributes (array[object])
        + Thing

Drafter 4.0.0-pre.3

@kylef kylef added the bug label Apr 10, 2019
@kylef
Copy link
Member Author

kylef commented Apr 10, 2019

Drafter 3.2.7 succeeds and returns the following JSON body:

[
  {
    "": "Thing"
  }
]

It does not produce any warnings or errors.

@kylef
Copy link
Member Author

kylef commented Apr 11, 2019

Another case, perhaps not same bug but it seems related:

# GET /

+ Response 200 (application/json)
    + Attributes (Array)
        + (object)

## Data Structures

### Array (array)
Assertion failed: (hasValue_), function get, file ../src/refract/Element.h, line 75.
fish: './bin/drafter 682-1.apib' terminated by signal SIGABRT (Abort)

@tjanc tjanc self-assigned this Apr 11, 2019
@tjanc tjanc mentioned this issue Apr 24, 2019
@tjanc
Copy link
Contributor

tjanc commented Apr 24, 2019

Another case, perhaps not same bug but it seems related:

# GET /

+ Response 200 (application/json)
    + Attributes (Array)
        + (object)

## Data Structures

### Array (array)
Assertion failed: (hasValue_), function get, file ../src/refract/Element.h, line 75.
fish: './bin/drafter 682-1.apib' terminated by signal SIGABRT (Abort)

It's independent. See #683

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

2 participants