Closed akaRem closed 8 years ago
I have the url in an input so it can be easily copied and pasted, so, putting the method and the path in an input group just looked better with bootstrap's input-group styles.
Is it causing an issue? I can remove the tab-index and if you have a tab issue.
No, it just looks strange.. Button that does nothing when pressed.
Looks very well, agree. But it doesn't seem to be semantic.
Offtop:
This package looks very, very cool to me. Do you plan to make "standalone" version? I mean something that works with just jsonschema and/or expressjs?
Is it possible to exclude "handler" section?
How does it work with nested objects?
I really didn't test it yet because still on on express and don't want to go to koa, but still .. your projects looks very good.
Hi Ivan,
Thanks for the feedback. I will change the button to a label.
In terms of a standalone version; I have some initial plans but it is going in a different direction. I currently use koa
and joi-router
for api between a few micro-services. This project lets me host the docs very easily so if I don't know how to use a service; I quickly lookup /docs
. So my stack is fairly limited at this point.
I the future, I am thinking of switching to grpc
and protocol buffers
for internal calls. In that case, I will be making a documentation generator for that. When I do that (timeline approx. May 2016), I will create a more generic one, so I don't have to keep writing it over and over. That will likely be under a different name, so I will let you know when that happens.
Regarding your comment about nested items; not sure what that means. Do you mean nested routers or nested resources like /store/1/pets/1
?
In both those cases, just put the specs for each router into a separate groups. So have a Store group and a Pets group. Is that what you meant?
I meant nested complex objects in schemas, e.g. something like this:
schema = {
type: "object",
properties: {
pet: {
type: "object",
properties: '...'
}
}
}
and valid doc
document = {
pet: {
id: 10,
name: "Rex",
...
}
}
Such complicated schemas require nested tables in body specifications.
Does koa-docs
handle such cases?
OK, understood. In that case I think the way it is handled in other doc generators (namely swagger) is to have a concept of models which get rendered at the end of the page.
Same can be achieved in joi using an object type with a label. Ex : joi.object().label('Pet').keys({...})
This is not implemented yet, bit I will do that before 1.0 On Dec 8, 2015 6:24 AM, "Ivan" notifications@github.com wrote:
I meant nested complex objects in schemas, e.g. something like this:
schema = { type: "object", properties: { pet: { type: "object, properties: ... } }}
and valid doc
document = { pet: { id: 10, name: "Rex", ... } }
Such complicated schemas require nested tables in body specifications. Does koa-docs handle such cases?
— Reply to this email directly or view it on GitHub https://github.com/a-s-o/koa-docs/issues/1#issuecomment-162854590.
Very lengthy delay for this one but both changes are implemented in v0.9.2 8e01c9b
routeHandlers
to disabled
in the top level options