When I load up the swaggerUI, I get the entries I expect and a couple seconds later, I get a red error icon at the bottom-right of the table and if I click it, I get the following.
I see all the entries I expect, the page is working and I have no errors on the server. My best guess is that one of my API entries (migrated from older versions of Swagger) are no longer valid, but I see no sign of which if that's the case. Looking at the reply from swagger.json, I get no additional clues either.
{
"schemaValidationMessages": [{
"level": "error",
"message": "Can't read from file https://localhost:7000/swagger.json"
}]
}
You'll have to provide a spec with more details.
@fehguy Wish I could have done more with this, but as I said; there were no errors or anything I could trace aside from that red error icon so I don't know how I'd have spec'd it without giving you my entire project or spending who-knows how much time pulling routes out and testing until I found some cause/effect pattern.
Hopefully someone else will find this later and have more to run with than I did :/
@rainabba the validator is trying to read your swagger.json file at https://localhost:7000/swagger.json. The validator is on the internet and cannot reach your localhost--it can only do so if the files are public on the internet (we don't post the file to the validator for obvious reasons).
Best to just disable the validator if you're using it against localhost, see here:
https://github.com/swagger-api/swagger-ui#parameters is not listing any parameters. can u mention what parameter i should use
found it here : https://swagger.io/docs/swagger-tools/#parameters-37
the parameter name in validatorUrl . set it to null.
eg:
// Build a system
const ui = SwaggerUIBundle({
url: specdocurl,
dom_id: '#swagger-ui',
deepLinking: true,
validatorUrl: null,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
i am using swagger ui webjar . is there a way to access the validatorUrl parameter
Most helpful comment
found it here : https://swagger.io/docs/swagger-tools/#parameters-37
the parameter name in validatorUrl . set it to null.
eg:
// Build a system
const ui = SwaggerUIBundle({
url: specdocurl,
dom_id: '#swagger-ui',
deepLinking: true,
validatorUrl: null,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})