outmoded / lout

API documentation generator
Other
276 stars 49 forks source link

Project maintainer #32

Closed hueniverse closed 11 years ago

hueniverse commented 11 years ago

We are looking for someone to take over the project and maintain it moving forward. Our team isn't currently using this which makes it hard to support.

Marsup commented 11 years ago

May I ask what are you using now ? Hapi-swagger ? If you switched to something else it might make sense to deprecate this one and advise on the other.

hueniverse commented 11 years ago

Oh sweet. I didn't know about hapi-swagger. We are currently no using anything - mainly because we don't offer third party access and we can all just read the route configuration in js directly. I am not married to lout and if something else is providing better solution, I'm happy to deprecate it. But in case people find this useful as a simpler doc generator, I'd like to find it a new owner.

Marsup commented 11 years ago

The offer is tempting, though I might not be the best candidate with my barely-a-week of experience on Hapi :smile:

hueniverse commented 11 years ago

This is more about HTML and CSS than hapi. Getting the data out of hapi is the trivial bit.

Marsup commented 11 years ago

Following your message on twitter, I'm still up for it if no one else is.

hueniverse commented 11 years ago

Sold! Do you want to take over the migration to joi 2.0 or do you want me to do it and take over from that point?

Marsup commented 11 years ago

That should be a good exercise for me :) I can't promise any ETA but will get on it ASAP. I guess I'll also have to support both versions in the same code base like you did, right ?

hueniverse commented 11 years ago

Nah, just move it to use version 2 and document it as a requirement. We will be moving hapi to 2.0 soon anyway. 1.16 is just a bridge version.

hueniverse commented 11 years ago

And you now have admin rights.

Marsup commented 11 years ago

Well I'll probably bump lout to 1.0 to avoid breaking people's projects then. Thanks for the rights.

Marsup commented 11 years ago

@hueniverse I've put up a new branch, sorry if the diff is a bit difficult to read because of the reformatting, I thought you might want to have a look before the feature lands in case I did a major mistake. I've managed to support both apis in the same code base so no major bump. I'll leave the branch up for review a few days unless you trust me completely and I'll merge it right away.

Marsup commented 11 years ago

By the way, do you want to keep control of the npm publishing or should I get maintainers rights there too ?

hueniverse commented 11 years ago

what's your npm handle?

hueniverse commented 11 years ago

I like how the first step is changing 4 spaces into 2.... :-)

Note that in v2, you should use the new describe() method. Don't access any of the _variables because that's not part of the contract.

Marsup commented 11 years ago

My handle is marsup as well, just lowercased.

Believe it or not, the spaces were not the 1st step actually :) If there's a strong guideline across spumko's projects I'll revert, it's just a personal preference, I'm not religious about that. The describe is something I knew and forgave along the way, and I'm sorry for that. The branch will be updated accordingly.

Marsup commented 11 years ago

Does hapi export the joi lib (not the types) at some point ? I don't see a clean way to get access to describe unless I require validation which is not exposed.

hueniverse commented 11 years ago

https://github.com/spumko/hapi/blob/master/docs/Style.md

hueniverse commented 11 years ago

File a bug against joi. _describe() should be describe()

hueniverse commented 11 years ago

And npm access added.

Marsup commented 11 years ago

Here's another attempt. Hopefully, got it right this time :) The diff is there: https://github.com/spumko/lout/compare/master...feature;joi_v2 Support is only for v2, as we discussed, evolving from v1 to v2 is almost nothing so I won't bother on backward compatibility.

hueniverse commented 11 years ago

At quick glance looks fine. @wpreul should take a look as he wrote the original code.

Marsup commented 10 years ago

Actually failed on something. params.constructor !== types.any can never be false. Since I don't have access to the true any, I have to do params instanceof types.any().constructor. It's ok but it seems like I would have far less troubles if I had access to the root describe of the library. I'll add tests for this case soon.

Marsup commented 10 years ago

Added a new route in the tests and modified the code in consequence.

Marsup commented 10 years ago

Another commit added, I went for a bigger change than I expected to deal with joi objects at the root. Since the root can now have properties of its own (eg. allowUnknown), I have to change the output/templates/models a bit to reflect that. It's essentially the same, but we now see the root object. I'll have to deal with arrays soon.

hueniverse commented 10 years ago

Should probably leave this issue alone and document further changes in new issues.

Marsup commented 10 years ago

I thought so as well. I'll merge this end of the week, unless @wpreul finds outstanding issues.