app.js
/**
 * Uses swagger-parser to dereference any $refs in the swagger spec.
 * app.conf.spec will be modified to included the resolved references.
 * @param {Application} app the application object to load routes into
 * @returns {Promise} a promise resolving to the app object
 */
Uses swagger-parser to dereference any $refs in the swagger spec.
app.conf.spec will be modified to included the resolved references.
@param {Application} app the application object to load routes into
@returns {Promise} a promise resolving to the app object
Uses swagger - parser to dereference any $refs in the swagger spec . app . conf . spec will be modified to included the resolved references . @param { Application } app the application object to load routes into @returns { Promise } a promise resolving to the app object
function dereferenceSwaggerSpec(app) {
    return SwaggerParser.dereference(app.conf.spec)
    .then((spec_dereferenced) => {
        app.conf.spec = spec_dereferenced;
        return app;
    })
    .catch((e) => {
        return app;
    });
}
function dereferenceSwaggerSpec ( app ) { return SwaggerParser . dereference ( app . conf . spec ) . then ( ( spec_dereferenced ) => { app . conf . spec = spec_dereferenced ; return app ; } ) . catch ( ( e ) => { return app ; } ) ; }
Uses swagger-parser to dereference any $refs in the swagger spec.
Uses swagger - parser to dereference any $refs in the swagger spec .
// resolve any remote references in the spec using SwaggerParser // We don't want to die because of a swagger spec resolve problem, // so just return app to continue on error.  (SwaggerParser.dereference // will log the error.)