Skip to content

Unify schemas and models folders #32

Description

@alvarobernal2412

Models and Schemas in Mongoose

Schemas and models in Mongoose have distinct purposes:

  • Schemas: Define the structure of the data and rules (validation, default values, etc.).
  • Models: Provide an interface for interacting with the database, enabling CRUD operations.

In this specific case, the distinction is not being used effectively. This creates unnecessary overhead and dead code. It is suggested to:

  • Refactor the schema and model differentiation: If certain schemas, like iAgree, are not actively used, they should either be removed or incorporated into documentation for reference.
  • Document exceptions: If a particular schema is critical (e.g., iAgree), add an explanation in the documentation instead of leaving it as unused code.

Description

There are currently two folders containing similar information. These folders need to be reviewed to determine:

  1. If either of them contains outdated information or dead code (which is quite likely as they haven’t been reviewed in years).
  2. Remove outdated or unnecessary files while preserving the useful ones.

Additionally, there are schemas in .yaml and .json format with the same name. This can lead to confusion when maintaining or expanding the registry.


Tasks

  • Review both folders:

    • Identify outdated information or dead code.
    • Remove unnecessary or obsolete files.
    • Consolidate and organize useful files.
  • Address duplicate schemas:

    • Analyze .yaml and .json schemas with the same name.
    • Decide whether to keep both formats or standardize to one.

References

Screenshots

Screenshot 1

Folder Overview

Screenshot 2

Schema Example

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