The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
ha, yea, you're pointing right at the hard part.
at first i had the models generate their swagger-schema.
but then i realized, endpoints often only return a partial view of a model
(i.e. you don't want to include the password-field with users and don't want
that mentioned in the swagger-docs either).
so... it's kinda annoying, i guess my renderers (aka serializers)
have to be aware both of their model and the endpoint.
maybe it's just not solvable without really forcing the user
to explicitly declare it...
I want to implement something like a dispatch table for a series of pseudo-bytecode instructions. I'd like to lookup each instruction and then yield my little VM to a proc, and execute each instruction that way.
Is this wise? And also, I don't see a yield_self method, am I missing something crucial?