arb / celebrate

A joi validation middleware for Express.
MIT License
1.33k stars 66 forks source link

Swagger integration #227

Closed anukul closed 2 years ago

anukul commented 3 years ago

Any ideas or plans for integration with Swagger / OpenAPI?

arb commented 3 years ago

We looked into a swagger integration previously but we didn't get very far. The compiled Joi schema is technically attached to the result function of celebrate().

const x = celebrate(...);
console.log(x._schema)

So you could start trying to map Joi schema's to whatever shape Swagger wants. That's what we tried a few years ago.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.