API Reference ApiCommons v0.1.0

Modules

Functions and Macros for quick REST API endpoint generation.

Parameter parse errors

  • `: ### Examples [{ "errorCode": "BAD_FORMAT", "field": "email", "originalValue": "suhas.chatekar", "mesage": "{email} is not in correct format", "helpUrl": "/help/BAD_FORMAT#email" }] { "id": "rate_limit", "message": "Account reached its API rate limit.", "url": "https://docs.service.com/rate-limits" } ## API Error codes ### 3xx - 301 (Moved) - REST API model has significantly been redesigned - 302 (Found) - - 303 (See Other) - - 304 (Not Modified) - - 307 (Temporary Redirect) - ### 4xx - 400 (Bad Request) - Generic client-side error - 401 (Unauthorized) - Client tried to operate on a protected resource - 403 (Forbidden) - Client request formed correctly, REST Api won't honor it. - 404 (Not Found) - Can't map URI to a resource - 405 (Method Not Allowed) API responds with a 405 error to indicate
Exception raised when trying to access a route without authorization

Handle parameters in path, body and query. Provide checks for availability, types and constraints.

Similar to Ecto.Changeset. Collects and holds information on valid and invalid parameters passed to the endpoint. Collect information on validity of endpoint parameter check ups.

Check parameter for specific characterstics.

Resolve parameters passed to the endpoint.

Resolve parameters passed to the endpoint.

Describe REST API request information in Plug.Conn.
Use private field "private" of Plug.Conn.

https://hexdocs.pm/plug/Plug.Conn.html
Utils useable for parameter checks.