pawcoding / astro-loader-pocketbase

A content loader for Astro that uses the PocketBase API
https://www.npmjs.com/package/astro-loader-pocketbase
MIT License
16 stars 2 forks source link

Correctly handle `json` fields #9

Closed pawcoding closed 1 month ago

pawcoding commented 1 month ago

Issues

Changes

elbotho commented 1 month ago

Maybe you can try it out and let me know if it works for you. My initial tests seem promising so far.

Obviously nicer this way, thank you! Works great for me. With and without jsonSchema.

PS: One thing I noticed: It seems I get no console output / warning if a validation fails (but this might be unrelated to the json topic)

pawcoding commented 1 month ago

Great, then I will merge this to get object working 🚀


Normally the dev server should crash with error messages like this if the schema is wrong: image image
links.links has no external field version is an object and not a string

Can you create a new issue for the missing validation with:

Then I can try to reproduce the problem locally and maybe find the bug.