Reputation: 1403
My routes contain the the 'api' tag
...
{
method: 'GET',
path: '/blah/albums',
options: { tags: ['api'], handler: myHandlerFunction }
},
...
and I am including the Inert, Vision, and hapi-swagger plugins
import Hapi from '@hapi/hapi'
import Inert from '@hapi/inert'
import Vision from '@hapi/vision'
import HapiSwagger from 'hapi-swagger'
...
const plugins = [
Inert,
Vision,
{
plugin: HapiSwagger,
options: swaggerOptions
},
...
When I hit the /swagger.json
endpoint I get the correct JSON data, but when I hit the /documentation
endpoint like the documentation says I get a {"statusCode":404,"error":"Not Found","message":"Not Found"}
Upvotes: 1
Views: 421