Skip to content

Wrong example when trailing slash and no path? #559

Closed
@mokkabonna

Description

@mokkabonna

Not sure if this is wrong or not, but might need to be changed to be consistent. It is although a very minor issue.

{
"contextUri": "https://api.example.com",
"contextPointer": "",
"rel": "self",
"targetUri": "https://api.example.com",
"attachmentPointer": ""
},
{
"contextUri": "https://api.example.com",
"contextPointer": "",
"rel": "about",
"targetUri": "https://api.example.com/docs",
"attachmentPointer": ""
}

Here the contextUri is set to https://api.example.com (no trailing slash) The base has a trailing slash. I know the slash can be omitted if the path is empty. But in reality the slash is there in those cases, just omitted. For instance when doing curl example.com -Iv it produces HEAD / HTTP/1.1 Chrome does the same.

Especially when the base contains a trailing slash the example should IMO contain a trailing slash as well.

So the suggested change:

{
        "contextUri": "https://api.example.com/",
        "contextPointer": "",
        "rel": "self",
        "targetUri": "https://api.example.com/",
        "attachmentPointer": ""
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions