You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> require('joi').string().uri().validate('/foo')
{ error:
{ [ValidationError: "value" must be a valid uri]
…
A relative relative reference takes advantage of the hierarchical syntax(Section 1.2.3) to express a URI reference relative to the name space of another hierarchical URI
– RFC 3986 Section 4.2
If you insist on a URL being locatable, you should a) add a new method url to so insist, and b) consider what you're going to do about this case:
Scenario: I'd like to issue relative paths to other documents from an API while keeping the option open to make them absolute. It feels wrong to document them as plain strings. I'd like the result, run through joi-to-json-schema, to wear the format uri.
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugBug or defectfeatureNew functionality or improvement
If you insist on a URL being locatable, you should a) add a new method
url
to so insist, and b) consider what you're going to do about this case:Scenario: I'd like to issue relative paths to other documents from an API while keeping the option open to make them absolute. It feels wrong to document them as plain strings. I'd like the result, run through
joi-to-json-schema
, to wear the formaturi
.The text was updated successfully, but these errors were encountered: