feat: resolve Concept enum validation errors — expand schema & align seed data#1
Merged
crisecheverria merged 1 commit intoAug 22, 2025
Conversation
Owner
|
Ignore failing ci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mongoose threw validation errors because some entries in
concepts.jsoncontained invalid enum values that were not present in the schema.Schema Before
Invalid Data Examples
"type": "tutorial"❌ (not in enum)"type": "tool"❌ (not in enum)"language": "agnostic"❌ (not in enum)Cause
Mongoose’s strict enum validation rejected these values because they were not defined in the schema.
This is a data integrity feature to prevent invalid or inconsistent values from entering the database.
Solution
Expanded Enum Definitions
Added additional enum values in
ConceptSchemato cover all intended data cases.Updated Seed Data (
concepts.json)Replaced invalid values to match schema definitions:
"tutorial"→"documentation""tool"→"repository""agnostic"→"all"Re-ran Seeder
After updates, the seeding script ran successfully without validation errors.
Benefits
Lessons Learned
Status
All tests have passed, and the branch is now ready for PR merge. 🎉
Thank You