Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught URIError: URI malformed #528

Closed
adamserafini opened this issue Sep 11, 2017 · 5 comments
Closed

Uncaught URIError: URI malformed #528

adamserafini opened this issue Sep 11, 2017 · 5 comments
Assignees
Labels

Comments

@adamserafini
Copy link

I have the following raml file which I build using api-console build --json api.raml

#%RAML 1.0
title: My API
version: v1
baseUri: http://somewebsite.com/
/restaurants/:
  get:
    queryParameters:
      city:
        type: string
        required: true
        example: berlin
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "message" : "Hello World"
              }

I then copy the files the contents of /build folder to an ngnix server at http://mydocserver.com

The problem is at the point when I want to 'TRY' the api from the page hosted on the doc server. I get a message like in the following screenshot:

Any pointers where I'm going wrong?

image

@adamserafini
Copy link
Author

If it helps, the browser debug console reads as follows:

image

@jarrodek
Copy link
Contributor

Hi,
Thank you for the issue report.
It looks like Prism's library (highlights the response) throws an error for some reason (there must be malformed URL in the response).
The problem is with the library but I'll try to do something about it.

@jarrodek jarrodek added the bug label Sep 13, 2017
@jarrodek jarrodek self-assigned this Sep 13, 2017
@jarrodek jarrodek added the v4 label Sep 13, 2017
@jarrodek
Copy link
Contributor

@adamserafini Is it possible for you to send me an example response that throws this error?

@adamserafini
Copy link
Author

Hi @jarrodek I don't think there is a problem in the response because if I use a known 'correct' API the same things happens. For example check response here and screenshot below: https://jsonplaceholder.typicode.com/posts

Also what is weird - In the network tab it never makes a call to the URL https://jsonplaceholder.typicode.com/posts - is that expected? It is like something is going wrong before the requests even gets made.

image

@jarrodek
Copy link
Contributor

This is now fixed in 6.0.0 as it has different approach to parsing response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants