-
Notifications
You must be signed in to change notification settings - Fork 54
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
Nested arrays are not parsed correctly #47
Comments
Thanks for the report @JeroenVdb. I am going to look into this now. |
This is a bug in the parser itself. The generated MSON AST is not correct given the MSON. |
Super @pksunkara can you give a shout here when this is fixed? |
@JeroenVdb Apiary should have the bug fix as soon as we release the bug fix in here. |
@pksunkara Is this the right snowcrash bug? Or is one filed? |
@alexturek No, that is a different bug. This is a drafter or drafter.js bug which needs to be fixed which is why it is created in drafter repo. |
Please refer this: apiaryio/drafter.js#38 Working apib: FORMAT: 1A
# Test nested arrays-in-object-arrays
A navigation has multiple categories. Each category can have multiple subcategories.
# GET /navigation
+ Response 200 (application/json)
+ Attributes
+ categories (array)
+ (object, fixed)
+ name: Category One (string) - Name of the category
+ subcategories (array)
+ (object, fixed)
+ name: Sub category One (string) - Name of the subcategory OK, the schema works while the example not when I compiled it with aglio. However, |
@pksunkara I mentioned this in a an apiary issue ( danielgtaylor/aglio#155), would you agree this is the same issue? Also, I'm more than happy to help out on this, just point me in the right direction. I know we spoke of this earlier but now that I am far more familiar with the drafter codebase I can probably understand the issue better. |
@obihann No, this issue is completely different. The blueprint is not correctly being parsed at all in this issue while danielgtaylor/aglio#55 is about JSON Schema rendering. |
@pksunkara strange, they seem so similar, oh well I'll trust your expertise 👍. Once |
Just to verify, is this issue also about following problem or is my problem a new thing? Input:
Generated JSON:
Expected JSON:
|
@honzajavorek it probably is the same issue or at least it is fixed in the #199 PR as is this one. |
@JeroenVdb It has been fixed a while ago can you verify? I am closing this one, if it doesn't work for you feel free to reopen |
The nested array object is not correctly parsed using drafter, see the example API Blueprint below.
In Apiary I can see render only
instead of
Example Blueprint
EDIT by @pksunkara: The MSON AST which is generated from the blueprint is wrong.
The text was updated successfully, but these errors were encountered: