Skip to content

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

@tdextrous

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?

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