Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JKHeadley committed Jun 15, 2017
1 parent 4a24518 commit 9fc221c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,8 @@ module.exports = function () {
[Back to top](#readme-contents)

## Route customization

### Custom path names
By default route paths are constructed using model names, however aliases can be provided to customize the route paths.
``routeOptions.alias`` can be set to alter the base path name, and an ``alias`` property for an association can be set
to alter the association path name. For example:
Expand Down Expand Up @@ -934,6 +936,17 @@ DELETE /person/{ownerId}/team/{childId}
PUT /person/{ownerId}/team/{childId}
```

### Omitting routes

You can prevent CRUD endpoints from generating by setting the correct property to ``false`` within the routeOptions object. Below is a list of properties and their effect:

Property | Effect when false
--- | ---
allowRead | omits ``GET /path`` and ``GET /path/{_id}`` endpoints
allowCreate | omits ``POST /path`` endpoint
allowUpdate | omits ``PUT /path/{_id}`` endpoint
allowDelete | omits ``DELETE /path`` and ``DELETE /path/{_id}`` endpoints

[Back to top](#readme-contents)

## Querying
Expand Down

0 comments on commit 9fc221c

Please sign in to comment.