IBM/openapi-validator

Warning on valid server object

Closed this issue · 4 comments

Validating the following yields the following warning: Server URL should not have a trailing slash.

{
  "openapi": "3.0.3",
  "info": {
    "version": "1.0.0",
    "title": "test"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "servers": [
    {
      "url": "/"
    }
  ],
  "description": "test",
  "components": {},
  "paths": {}
}

However, per https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#oasDocument:

which states:

the default value would be a Server Object with a url value of /

a server object with a url value of / should be acceptable

Fix submitted to upstream Spectral project:

stoplightio/spectral#1427

@mkistler looks like your upstream PR was merged and released. Can we close this issue ?

To truly call this done, we probably want to update our Spectral dependency to ensure the fix is pulled in. But I have a couple of other Spectral PRs open that I hope will be merged soon, so lets hold off for a few days and maybe get them all at once.

Updated our Spectral dependency