<commit_before># API
API documentation for `rest-io`.

## restIO(app[, config])
Registers the app with `rest-io`. This allows `rest-io` to bind the routings automatically. The `bodyParser` module will be used to parse the `json` requests.

Property  | Description                   | Type     | Default
--------- | ----------------------------- | -------- | -------------------------
db        | database instance of mongoose | Mongoose | Mongoose default instance
resources | the path to your resources    | string   |

## new restIO.Resource(config)
Resources are routed automatically with the configuration provided. These configurations are provided to the `Resource` constructor.

Property       | Description                                                           | Type     | Default
-------------- | --------------------------------------------------------------------- | -------- | ----------
name           | The name of the resource                                              | String   | Mandatory
model          | The mongoose `Schema` config                                          | Schema   | Mandatory
parentRef      | The parent reference of the resource to be populated during retrieval | String   |
populate       | The children to populate, space separated                             | String   |
plural         | The plural form of the resource name                                  | String   | pluralize
parentResource | The parent of this resource                                           | Resource |<commit_msg>updated the api documentation<commit_after># API
API documentation for `rest-io`.

## new RestIO(app[, config])
Registers the app with `rest-io`. This allows `rest-io` to bind the routings automatically. The `bodyParser` module will be used to parse the `json` requests.

Property  | Description                   | Type     | Default
--------- | ----------------------------- | -------- | -------------------------
db        | database instance of mongoose | Mongoose | Mongoose default instance
resources | the path to your resources    | string   |

## new restIO.Resource(config)
Resources are routed automatically with the configuration provided. These configurations are provided to the `Resource` constructor.

Property       | Description                                                           | Type     | Default
-------------- | --------------------------------------------------------------------- | -------- | ----------
name           | The name of the resource                                              | String   | Mandatory
model          | The mongoose `Schema` config                                          | Schema   | Mandatory
parentRef      | The parent reference of the resource to be populated during retrieval | String   |
populate       | The children to populate, space separated                             | String   |
plural         | The plural form of the resource name                                  | String   | pluralize
parentResource | The parent of this resource                                           | Resource |
{'fraction_non_alphanumeric': 0.15938303341902313, 'fraction_numerical': 0.0, 'mean_word_length': 1.2219842969307637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5949670', 'n_tokens_mistral': 571, 'n_tokens_neox': 556, 'n_words': 258}