Closed VasiliyLysokobylko closed 8 years ago
When the base URI ends in one or more slashes (/), those trailing slashes are to be omitted in constructing the absolute paths for the resources using that base URI.
/
For example, in
baseUri: http://api.test.com/common/ /users: /groups:
the absolute paths for the two resources are http://api.test.com/common/users and http://api.test.com/common/users/groups.
http://api.test.com/common/users
http://api.test.com/common/users/groups
In a more complicated examples with consecutive slashes in multiple places, note that only trailing slashes in the base URI are collapsed:
baseUri: //api.test.com//common// /: /users/: /groups//:
leads to the following 3 resource absolute paths: //api.test.com//common/, //api.test.com//common//users/ and //api.test.com//common//users//groups//.
//api.test.com//common/
//api.test.com//common//users/
//api.test.com//common//users//groups//
Various clients and servers may choose to handle these in different ways, but from an HTTP and RAML perspective, these are the resource paths.
https://github.com/raml-org/raml-spec/issues/256
When the base URI ends in one or more slashes (
/
), those trailing slashes are to be omitted in constructing the absolute paths for the resources using that base URI.For example, in
the absolute paths for the two resources are
http://api.test.com/common/users
andhttp://api.test.com/common/users/groups
.In a more complicated examples with consecutive slashes in multiple places, note that only trailing slashes in the base URI are collapsed:
leads to the following 3 resource absolute paths:
//api.test.com//common/
,//api.test.com//common//users/
and//api.test.com//common//users//groups//
.Various clients and servers may choose to handle these in different ways, but from an HTTP and RAML perspective, these are the resource paths.