playground icon indicating copy to clipboard operation
playground copied to clipboard

Relative URL support in server object

Open siy opened this issue 3 years ago • 1 comments

Following specification:

{
  "openrpc": "1.2.4",
  "info": {
    "title": "",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/path"
    }
  ],
  "methods": []
}

Triggers following validation error in playground:9:14 - String is not a URI: URI with a scheme is expected.

According to specification, the URL may be relative:

REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenRPC document is being served. Server Variables are passed into the Runtime Expression to produce a server URL.

So, I'd expect that relative URL should be accepted here.

siy avatar Jun 02 '21 15:06 siy