apiaryio / drafter

API Blueprint Parser (C++)
https://apiblueprint.org/
MIT License
302 stars 54 forks source link

JSON Schema generator fails on ExtendElement in enum #217

Closed w-vi closed 8 years ago

w-vi commented 8 years ago
curl -s https://raw.githubusercontent.com/hassansin/foxycart-api-
blueprint/master/apiary.apib | drafter -l

error: (4)  ExtendElement must be composed from Elements of same type

I can't reproduce using latest drafter but getting different error

curl -s https://raw.githubusercontent.com/hassansin/foxycart-api-
blueprint/master/apiary.apib | drafter -l

error: (4)  ExtendElement serialization Not Implemented

At least part of the problem is that JSON Schema generator is not expanding elements if in enum, that's where the second error is coming from.

zdne commented 8 years ago

@w-vi any updates on this? I am still getting


yt:~ z$ curl -s https://raw.githubusercontent.com/hassansin/foxycart-api-blueprint/mas
ter/apiary.apib | drafter -l

OK.
warning: (4)  ExtendElement must be composed from Elements of same type
w-vi commented 8 years ago

@zdne haven't had a time to dig deeper yet. It's not an issue in JSON Schema generator anymore, it is deeper in MSON hadnling code.

pksunkara commented 8 years ago

I was running into this issue earlier but I wasn't able to dig deeper without the source maps on drafter. I know this issue is happening because of an enum based Named type but wasn't able to understand why this is happening.

Baggz commented 8 years ago

@z @pksunkara @w-vi

We have quite a few Apiary users running into this issue as well.