Module: openapigenerator

OpenAPI Generator.
Source:

Methods

(static) generateV2(template, schemas) → {RequestHandler}

Returns an express RequestHandler function that will send an OpenAPI 2.0 document as a JSON response. The template is merged with the paths and definitions generated from the Avro schema map. A generated response definition is created with the name 'Response' this must not clash with any schemas passed in.
Parameters:
Name Type Description
template object The OpenAPI 2.0 template.
schemas object Map of name to Avro schema JSON object.
Source:
Returns:
- The handler.
Type
RequestHandler

Type Definitions

RequestHandler(req, res)

An express request handler.
Parameters:
Name Type Description
req Object The request.
res Object The response.
Source: