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

URL should match format "uri" #15

Open
thim81 opened this issue Sep 28, 2020 · 3 comments
Open

URL should match format "uri" #15

thim81 opened this issue Sep 28, 2020 · 3 comments

Comments

@thim81
Copy link

thim81 commented Sep 28, 2020

Hi,

I try to enrich a JSON generated file that is in a valid openapi JSON format and properly renders in Redoc.

But still I get this error:

[Error [HARError]: validation failed] {
  errors: [
    {
      keyword: 'format',
      dataPath: '.url',
      schemaPath: '#/properties/url/format',
      params: { format: 'uri' },
      message: 'should match format "uri"'
    }
  ]
}

It is clear that there is something wrong with the URL, but I have no idea where to look.

Could you point in the right direction? Or is there an option to show more detailed debug output?

@andrzejwp
Copy link
Contributor

andrzejwp commented Sep 28, 2020 via email

@TimUnderhay
Copy link

@thim81 I had the same problem. In my case, I inadvertently had a space in an OpenAPI server URI.

@thim81
Copy link
Author

thim81 commented Dec 18, 2020

@KensingtonTech

This how my servers object looks like:

  "servers": [
    {
      "url": "{baseUrl}",
      "variables": {
        "baseUrl": {
          "default": "https://acme.com",
          "description": "Base URL domain"
        }
      }
    }
  ],

There is no spaces, but I still get the error.

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

No branches or pull requests

3 participants