Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnJoiable Documentation for ".describe()" #441

Closed
martinheidegger opened this issue Sep 21, 2014 · 20 comments
Closed

EnJoiable Documentation for ".describe()" #441

martinheidegger opened this issue Sep 21, 2014 · 20 comments
Assignees
Labels
feature New functionality or improvement

Comments

@martinheidegger
Copy link
Contributor

It would be nice to have documentation on the output of ".describe". Preferably written in joi?!

@martinheidegger martinheidegger changed the title EnJoyable Documentation for ".describe()" EnJoiable Documentation for ".describe()" Sep 21, 2014
@Marsup Marsup mentioned this issue Mar 5, 2015
@myndzi
Copy link

myndzi commented Mar 6, 2015

How's this for a start? https://gist.github.com/myndzi/8ec496e429fd2f4ff783

@martinheidegger
Copy link
Contributor Author

👍 but actually I though of a joi document describing the output of describe

@myndzi
Copy link

myndzi commented Mar 6, 2015

I know you did, but I'm not that meta, and I find it dubiously useful :P

@danielo515
Copy link
Contributor

I think that @myndzi approach is perfect for the documentation. Why is it not merged?

@WesTyler
Copy link
Contributor

Why is which not merged? I'm not seeing a related PR.

@DavidTPate
Copy link
Contributor

@danielo515 I'd love to take a look at a PR if one lands for improving the functionality of describe().

@danielo515
Copy link
Contributor

@WesTyler it's not technically a PR, but there is an obvious piece of documentation that can be added by any member of the team. My question may be reformulated as: What's wrong about the proposed documentation ?

@danielo515
Copy link
Contributor

@DavidTPate I can think on several ways of improving the describe method. However, most of them are biased and targeted at specific use cases. Ideally an improvement would be to allow developers extend the behavior of describe, like it's possible for new types and rules.

@KidLinus
Copy link

Bump? Took me a while to get here and this functionality is required if this is to be used in a production level api.

@Marsup
Copy link
Collaborator

Marsup commented Feb 22, 2018

How so ?

@KidLinus
Copy link

We need to be able to show how the API validates the input in the documentation.

@WesTyler
Copy link
Contributor

Are you using hapi?

We have hapi-swagger enabled on our services to show the route validation rules, apart from .describe()

@danielo515
Copy link
Contributor

Hapi-swagger makes an excellent job turning joi descriptions into examples, forms and api descriptions. It's awesome. I would love to see some of that features as a standalone plugin

@KidLinus
Copy link

Are you using hapi?
No, I'm not unfortunately :/

@WesTyler
Copy link
Contributor

Ah, bummer.

I still have a branch that is in progress for this. It's just gotten difficult to find time to prioritize it. :/

@KidLinus
Copy link

I still have a branch that is in progress for this. It's just gotten difficult to find time to prioritize it. :/

Thats understandable, but am I to understand that this is part of the stable API? That would be good enough for me.

@WesTyler
Copy link
Contributor

Until it is documented fully, it can technically be changed without notice.

That being said, it has been stable for quite some time. There may be changes as documentation clears up inconsistencies and oddities, but I use it a LOT right now.

@aaronjameslang
Copy link
Contributor

Should I open a PR merging https://gist.github.com/myndzi/8ec496e429fd2f4ff783 into https://github.com/hapijs/joi/blob/v13.4.0/API.md#describeschema? Is that documentation still correct?

@Marsup Marsup self-assigned this Jun 16, 2018
@Marsup
Copy link
Collaborator

Marsup commented Jul 24, 2018

I'm going to close this now we have a basic documentation for it, not that there's no more work to do on it.

@Marsup Marsup closed this as completed Jul 24, 2018
@hueniverse hueniverse added feature New functionality or improvement and removed request labels Sep 19, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

9 participants