Closed ramukima closed 8 years ago
Note that, with recent changes to yang-js, the list entry unique validation is broken and I am able to create more than one pet with the same identifier.
Ah, yes, before there was no @emit 'create', this
at the end of the block... will fix now.
Right, on the list entry unique validation was a temporary compromise - I meant to bring it back but the reminder is helpful. :-)
BTW, take a look at http://github.com/corenova/yang-swagger. It allows you to have auto-generated documentation integration with apiary.io. http://docs.yangswagger.apiary.io for self-documentation of YANG model-driven projects. It was created for the 'yang-cord' project, which you can see here: http://docs.yangcord.apiary.io
Creating a pet using yang-express:petstore example returns this error -
The reason is that a 'true/false' value is returned by Property.create as part of its last statement execution (which is @emit 'create', value). I think the intent was to return the model/property (this) as part of create.
Adding a return statement in property.litcoffee like below fixes the issue: