-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I have set up the mkdocs-swagger-plugin to call my local https://server.net/swagger.json but the script fails on exception:
TypeError: swagger.paths[path] is undefined
My config in mkdocs.yml is:
plugins:
- swagger
extra:
swagger_url: 'https://server.net/swagger.json'and the page being rendered has:
!!GET /users/{id}!!looking at the function call, it is:
function findApiFromSwagger(swagger, method, path) {
'use strict'
return swagger.paths[path][method.toLowerCase()]
}
this seems to be using the object:
swagger: Object: "2.0", host": "petstore.swagger.io", "basePath": "/v2", ...}
method: "GET"
path: "users/{id}"
This suggests that the plugin is not setting SWAGGER_URL properly and instead is using the default:
const SWAGGER_URL = 'https://petstore.swagger.io/v2/swagger.json'
I'm not quite sure how I should fix it?
Metadata
Metadata
Assignees
Labels
No labels