Nuxt Content csv docs example: Schema in content.config.ts not being applied? #3489
Unanswered
peter-chipello
asked this question in
Q&A
Replies: 1 comment
-
Yeah I'm seeing this too. @farnabaz ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Followed steps to Define Collection, Create .csv files, and Query Data in the docs, but custom fields author.name and author.email are not available at the top level of the returned object as expected but can only be accessed under meta.body at e.g., author.meta.body[0].name (see authors object below). Not sure why custom fields defined in schema are not being returned at top level as shown in the docs? reproduction here
authors object returned:
[ { "id": "authors/authors/team.csv", "avatar": null, "email": null, "extension": "csv", "meta": { "path": "/authors/team", "body": [ { "name": "John Doe", "role": "Developer", "avatar": "https://avatars.githubusercontent.com/u/1?v=4" }, { "name": "Jane Smith", "role": "Designer", "avatar": "https://avatars.githubusercontent.com/u/2?v=4" } ], "title": "Team" }, "name": null, "stem": "authors/team", "__hash__": "Oe8VG5m3BR739Hh-QuZW1ZCESmY2N6UvET55i5uDiNA" }, { "id": "authors/authors/users.csv", "avatar": null, "email": null, "extension": "csv", "meta": { "path": "/authors/users", "body": [ { "id": "1", "name": "John Doe", "email": "john@example.com" }, { "id": "2", "name": "Jane Smith", "email": "jane@example.com" }, { "id": "3", "name": "Alice Johnson", "email": "alice@example.com" } ], "title": "Users" }, "name": null, "stem": "authors/users", "__hash__": "J8coYUHTDpb-Kp2dXYqj540Ya7SU3jYWs0vnn8xyGdM" } ]
From package.json:
"dependencies": { "@nuxt/content": "^3.6.3", "@nuxt/eslint": "1.7.1", "better-sqlite3": "^12.2.0", "nuxt": "^4.0.2" },
Beta Was this translation helpful? Give feedback.
All reactions