Skip to content

Commit

Permalink
docs: improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Josuto committed Apr 20, 2024
1 parent e5bfa07 commit 5565f1e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,9 @@ at your domain model. This is mainly to avoid marrying the underlying infrastruc
rid of this repository logic if something better comes in. It also allows you to have more control on the persistence
properties of your domain objects. After all, database definition is a thing that Mongoose is really rock-solid about.

`monguito` includes `BaseSchema`, a Mongoose schema that specifies some logic required to convert Mongoose documents
into domain objects. You could implement such a function yourself or use the `extendSchema` utility function to extend
`BaseSchema` with your schema definition. Moreover, `extendSchema` allows you to register any standalone Mongoose plugin
of your liking into the resulting schema. This function also adds all the Mongoose plugins included in the input schemas
`monguito` includes `BaseSchema`, a Mongoose schema that specifies some logic required to convert MongoDB documents
to domain objects. You could implement such a function yourself or use the `extendSchema` utility function to extend
`BaseSchema` with your schema definition. Moreover, `extendSchema` allows you to register any [standalone Mongoose plugin](https://plugins.mongoosejs.io/) of your liking into the resulting schema. This function automatically adds all the Mongoose plugins included in the input schemas
to the resulting schema.

The following example shows the convenience of using `extendSchema` to define schemas for polymorphic data structures,
Expand Down

0 comments on commit 5565f1e

Please sign in to comment.