Skip to content

[Question] Can't follow Google AIP for API design #6436

@zraul123

Description

@zraul123

I've already tried asking in other channels with no luck unfortunately.
The company I work at looks on standardizing on Google AIP for API design, which went well until we started looking at our Elixir services.

Google AIP (and other API Design books) recommend having custom actions on a resource with a colon for it. For example: https://google.aip.dev/235, recommends having batch delete as /users:batchDelete (notice the colon).

Now, the big problem is that phoenix uses the colon as a delimiter for user-provided variables in path segments.
So, the questions I'm seeking answers to are:

  1. Is there a way to treat the colon in an URL as-it-is? I've tried parsing the custom action and manually routing, and URI-encoding the colon, none of these solutions provided a good enough approach.
  2. Would the community be open to a way to support colon in path segments natively? I can take the work, but I would need at least a direction since this would be my first PR in Phoenix

Thank you!

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