Fork me on GitHub

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


@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


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


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


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


@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’


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