hapi-swaggered icon indicating copy to clipboard operation
hapi-swaggered copied to clipboard

Yet another hapi plugin providing swagger compliant API specifications based on routes and joi schemas to be used with swagger-ui.

Results 38 hapi-swaggered issues
Sort by recently updated
recently updated
newest added

When using [joi.any.example()](https://github.com/hapijs/joi/blob/v14.0.6/API.md#anyexamplevalues), the generated schema contains a map with a `value` prop. This PR flattens the example properties to only the value of the `value` property. Given this joi...

The OpenAPI spec (v2 and v3) allow for `x-` [prefixed vendor extensions](https://swagger.io/specification/v2/#vendorExtensions) throughout. These should be accounted for in the schema. For example, ReDoc utilizes them heavily: https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md

I'm not sure yet why this is happening but when I serve my Swagger UI with this plugin via AWS API Gateway, it displays incorrectly - I see a page...

I have a fairly complex validation object shared on multiple routes. Sometimes with slight modifications which are handled by joi.alternatives: ``` //generic.id = Joi.alternatives().try( // Joi.string().length(24).alphanum().lowercase(), // Joi.object().type(mongoose.Types.ObjectId) //); exports.request...

@z0mt3c Congrats for the great plugin! Wanted to know if you have any plans for supporting the latest Open API 3.x spec?

Is there any way to send also header with requests?

The quantity field will not be displayed, so I am forced to use Joi.number().positive().integer() instead. ``` quantity: Joi.when('unit', { is: 'shares', then: Joi.number().positive().integer(), otherwise: Joi.number().positive() }).required().example(1), ```

For some weird reason lodash is unable to clone route with optional parameters. in lib\utils.js utils.groupRoutesByPath if you use Hoek instead of lodash, it works. // const secondaryRoute = _.cloneDeep(route)...