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
};
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?
Steps to reproduce the behavior:
Should not error
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?
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:
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).
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:
I resolved the issue that I ran into (was caused by improper use of
$ref...bad reference).