swagger-ui-express support? debResolveSubtrees: don't have a system to operate on, aborting

Created on 18 Sep 2018  路  2Comments  路  Source: swagger-api/swagger-ui

Q&A (please complete the following information)

  • OS: Linux
  • Browser: chrome
  • Version: 69.0.3497.81
  • Method of installation: npm via swagger-ui-epxress
  • Swagger-UI version: 3.18.1
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

Download swagger-ui-express and use it with any example open api spec

Example Swagger/OpenAPI definition:

/**
 * @swagger
 * /user:
 *   post:
 *     tags:
 *       - User
 *     description: Save user
 *     produces:
 *       - application/json
 *     parameters:
 *       - name: user
 *         description: User object
 *         in: body
 *         required: true
 *         schema:
 *           $ref: '#/definitions/User'
 *     responses:
 *       200:
 *         description: Return saved user
 *         schema:
 *           $ref: '#/definitions/User'
 */

Swagger-UI configuration options:

// options for swagger jsdoc 
const swaggerOptions = {
  swaggerDefinition: swaggerDefinition, // swagger definition
  apis: ['./config/swagmap.js'], // path where API specification are written
};

Describe the bug you're encountering

Before I get too deep into filling out this report.....is swagger-ui-express also considered an app that is not using swagger-ui directly?

To reproduce...

Steps to reproduce the behavior:

  1. Go to url
  2. Click on users
  3. See error

Expected behavior

Should not error

Additional context or thoughts

Is this issue supported? Author of swagger-ui-express suggest these issues be opened here, but your docs suggest you will not look into it because its not a direct installation. Is this true?

lock-bot

Most helpful comment

Hey @shockey, Thanks for looking into it. I got the impression that it might not be supported when i saw the following when filling out a bug report in github issues:

Issues on GitHub are only related to problems of Swagger-UI itself. We'll try
to offer support here for your use case, but we can't offer help with projects
that use Swagger-UI indirectly, like Springfox or swagger-node.

I resolved the issue that I ran into (was caused by improper use of $ref...bad reference).

All 2 comments

Interesting. Is this error causing any problems with what you're seeing on the page?

I put that message in mostly as a canary in case a subtle error was introduced by the system not being available when resolving is happening. As far as I've ever observed, it's not a problem in and of itself - perhaps console.warn would be more precise than console.error:

https://github.com/swagger-api/swagger-ui/blob/87296702c6110addc3714ad41044d5b9f564b2d5/src/core/plugins/spec/actions.js#L145

Is this issue supported? Author of swagger-ui-express suggest these issues be opened here, but your docs suggest you will not look into it because its not a direct installation. Is this true?

To me, it sounds like this is in our ballpark.

For context: we always accept reports concerning Swagger UI itself, regardless of context. We _don't_, however, have the bandwidth to help out with issues where Swagger UI is involved but not the root source of the issue. For example, if you're using a library that generates an OpenAPI document for you, and that document is rendering incorrectly because of the library's output, that would be something to open with the library, not us.

If you can point to what documentation had you worried about this being accepted, I can look into changing the messaging 馃槃

Hey @shockey, Thanks for looking into it. I got the impression that it might not be supported when i saw the following when filling out a bug report in github issues:

Issues on GitHub are only related to problems of Swagger-UI itself. We'll try
to offer support here for your use case, but we can't offer help with projects
that use Swagger-UI indirectly, like Springfox or swagger-node.

I resolved the issue that I ran into (was caused by improper use of $ref...bad reference).

Was this page helpful?
0 / 5 - 0 ratings