Skip to content

Controller endpoint naming/URL building convention #55

Closed
@SphtKr

Description

@SphtKr

Apparently I had been using a rather outdated JsonApiAdapter. When I updated to the latest, I noticed that by default it produces controller URLs in snake_case. (Is this the WebAPI default? Or used to be? Somehow mine have no underscores and I don't see where I've customized that if I have.)

Possibly in contrast, json-api/json-api#341 indirectly recommends dasherized names:

Dasherized and pluralized resource types can be used as URL segments without translation, as discussed below.

(Though strictly speaking the spec remains agnostic to URL conventions.) This also seems to be a REST best practice, perhaps.

Either can be supported via a IHttpControllerSelector, and it can be made to even support multiple paths for a single controller. Should we add an IHttpControllerSelector to JSONAPI.NET to support dasherized paths?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions