kevinswiber / siren

Structured Interface for Representing Entities, super-rad hypermedia
MIT License
1.3k stars 71 forks source link

Relative uris? #93

Open ashic opened 6 years ago

ashic commented 6 years ago

For link and action hrefs, is the anything preventing the use of relative uris? Does the spec specify that all uris must be absolute?

ianchanning commented 6 years ago

One of the examples that @kevinswiber gave in #42 was http://fizzbuzzaas.herokuapp.com/, this uses relative URLs.

thomaseizinger commented 4 years ago

The JSON schema unfortunately uses format: uri which theoretically prevents relative URIs from being valid: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.7.3.5

One would have to use format: uri-reference to allow for absolute and relative ones.