question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UI Error, swagger.json, schemaValidationMessages but things appear to work

See original GitHub issue

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"
    }]
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
arvinsebastiancommented, Feb 22, 2018

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” })

4reactions
fehguycommented, Dec 29, 2016

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Error button on swagger UI that is ... - Stack Overflow
I just want to know why it is not working with IP address but working with localhost ? Swagger UI does not display...
Read more >
schemaValidationMessages on swagger-ui - Google Groups
I am getting the following error message in the Swagger-ui, which otherwise functions normally:
Read more >
Supported JSON Schema Keywords - Swagger
“Extended subset” means that some keywords are supported and some are not, some keywords have slightly different usage than in JSON Schema, and...
Read more >
Spring Boot RESTful API Documentation with Swagger 2
In this post, I'll cover how to use Swagger 2 to generate REST API documentation for a Spring Boot 2.0 project.
Read more >
Failed to load API definition. - SmartBear Community
api/swagger.json : Could not load file or assembly Newtonsoft. ... I have installed the Nuget package direktly and it seems fine.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found