Closed garthk closed 9 years ago
Would
the API document has to be embedded in the configuration...
be simply solved by allowing specification of a path instead of an object?
i.e.
server.pack.register({
plugin: Swaggerize,
options: {
api: Path.join(__dirname, './config/pets.json'),
handlers: Path.join(__dirname, './handlers')
}
});
(note: this is now done in alpha.8
)
Can this be closed now?
No activity. Closing.
I'll check it out next time I throw together a REST API under Hapi. Thanks!
I assemble and deploy Hapi apps like I imagine @hueniverse and @unclebob would have them:
package.json
to install the right plugins and amanifest.json
to configure the Hapi packI'd love to take your design-driven approach and hand my teams the Swagger Editor, but
swaggerize-hapi
presents an obstacle. The API document has to be embedded in the configuration which, for me, is:manifest.json
, making dropping in a freshly edited API document harder than I'd likeI'm not sure whether this cuts across your architectural grain too much, but it strikes me you could:
server.dependency
onswaggerize-hapi
server.expose
, leaving it up to them how to load it from code, file, configuration, or external serviceThe registration method could be as simple as:
I regret I might not be able to contribute code because procedures, but I'm getting good at raising specific and actionable bug reports. Would that be enough help?