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

Relative URL support in server object #558

Open
siy opened this issue Jun 2, 2021 · 1 comment
Open

Relative URL support in server object #558

siy opened this issue Jun 2, 2021 · 1 comment

Comments

@siy
Copy link

siy commented Jun 2, 2021

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.

@BelfordZ
Copy link
Member

Thanks for the issue. You are totally right, and the issue fundamentally exists here.

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

2 participants