outmoded / lout

API documentation generator
Other
276 stars 49 forks source link

joi 4.0 #57

Closed hueniverse closed 10 years ago

hueniverse commented 10 years ago

Not yet in hapi (coming in 5.0) but should start looking at the changes in how describe work and all the new features.

Marsup commented 10 years ago

I'm already looking at most of the commits, but lout doesn't seem to be too much impacted in its current features, more in the new things coming, did you have anything specific in mind ? I can't seem to make the 5.0 branch work with joi 4, should it ?

hueniverse commented 10 years ago

5.0 branch is no where near ready...

I would like to see lout support the new conditionals, references, etc.

Marsup commented 10 years ago

Testing this a bit, refs are gonna be hard to get since it is described as a type 'any' and it's only by exploring the valids that I get a clue, still doable I guess.

hueniverse commented 10 years ago

Example? I didn't pay that much attention to describe()...

Marsup commented 10 years ago

All refs are output this way :

> Joi.compile(Joi.ref('a.b')).describe()
{ type: 'any',
  flags: { allowOnly: true },
  valids:
   [ undefined,
     { [Function]
       isContext: false,
       key: 'a.b',
       path: [Object],
       depth: 2,
       root: 'a',
       isJoi: true,
       toString: [Function] } ],
  invalids: [ null ] }

I already begun implementing detection in hapi5 branch, I think it should do unless internals of refs change.

hueniverse commented 10 years ago

That's a bug.

Marsup commented 10 years ago

@hueniverse The ref bug is not fixed in 4.3 right ?

hueniverse commented 10 years ago

No. I forgot about it due to lack of open issue...

Marsup commented 10 years ago

My bad, will do.

Marsup commented 10 years ago

OK this is almost feature complete ! The only thing missing is object.pattern for which I have no description, opening issue on joi.

Marsup commented 10 years ago

Unintentionally released as 5.0.2, closing this one.