Fork me on GitHub
#yada
<
2017-03-14
>
stijn10:03:07

with sub-resources, you cannot have any parameters (path or query) available to you in the sub-resource ctx?

malcolmsparks14:03:42

@stijn That's true, and that's a limitation with sub-resources - there are no interceptors that have run at the point your subresource is created

malcolmsparks14:03:01

I'm not sure what can be done, it's a bit of chicken-and-egg

malcolmsparks14:03:15

I've wondered whether to deprecate subresources and try to rely on the fact that each callback can return a function (dynamic resolution of values) rather than a value - that means swagger is not possible for those resources but it might be better than subresources

stijn16:03:39

ok, yes makes sense, the chicken-and-egg

lmergen19:03:51

@malcolmsparks i like that solution, am i correct that it’s a bit like a continuation-style approach ? semantically, i think it makes perfect sense to not have swagger docs for resources before they technically ‘exist’

lmergen19:03:32

you might want to describe some kind of interface for it instead, perhaps spec can be of help here ?