Skip to content

OpenAPI 3 relative server urls are marked as invalid. #59

Description

@tdextrous

When using relative server urls in OpenAPI 3.0 like shown:

"servers": [
  {
    "url": "/api/foo"
  }
]

An error is thrown:

TypeError [ERR_INVALID_URL]: Invalid URL: /api/foo

Stack trace points to the error occurring here. It seems that all values in the url field are assumed to be complete urls. Is there some way we can check for a relative url before passing to the URL constructor?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions