krakenjs / hapi-openapi

Build design-driven apis with OpenAPI (formerly swagger) 2.0 and hapi.
Other
211 stars 75 forks source link

Plugin fails with valid OpenAPI spec #117

Closed sergioalvz closed 6 years ago

sergioalvz commented 6 years ago

Hi there,

first of all, thanks for this amazing project :)

This is more a question than an issue itself but it is not possible to make the PetStore definition to work with this plugin because POST /v2/pet has an empty description '' (which does not look to be a valid value for Hapi's route.options.description). Since the document is a valid OpenAPI spec, perhaps it might be better to skip the description property for route.options in those cases... What do you think?

Cheers, Sergio

tlivings commented 6 years ago

Sounds good. If none is provided it should definitely not worry about it.

I just added it for the case where haps docs are generated (rare).

sergioalvz commented 6 years ago

@tlivings do you mind if I open a PR for this?

tlivings commented 6 years ago

Not at all!

tlivings commented 6 years ago

This is published in 1.0.1.

tlivings commented 6 years ago

Thanks for the PR.