I am new to Parse Server, and now trying out the parse-server-example, I just would like to know how could I define my schemas beforehand in the cloud side, so when do the first post request via rest api, it will follow the valiadation of my schemas.
I have also found this link, adding a schema via rest api. But I just would like initialize my schemas when parse server start (also need check if the schemas already to avoid repeating adding the same schemas). https://docs.parseplatform.org/rest/guide/#adding-a-schema
Hi @xeoshow and welcome! Predefined schemas are currently not supported, however @sadortun and @Moumouls have almost finished their PR which will make this feature part of the V5 release.
Hi Daniel,
Got it, thanks so much again for your kind help!
And another question: when will parse server V5 be released? And the V5 codebase is a big change from V4 or totally rewrite from scratch?
We are expecting V5 in the next month or so. V5 does contain some breaking changes and security improvements, but the core Parse Server will be mostly the same
Best way to get you started is to have a look at our open source project using it
You can add this to your config
And add your schemas:
We plan to implement unique indexes soon too.
For this you’ll need to use the code from the pr_migration branch from :
Note that the master branch have other currently PRs pending review. So it’s up to you, but using the pr_migration branch is probably a bit more stable.
PLEASE OPEN ISSUES ON OUR FORK IF YOU FiND ISSUES OR HAVE SUGGESTIONS FOR THE MIGRATION PR
Found below schema definition part, and a further question: could it be possible that we generate the rest api document based on this schema definition with adding comments info for all fields?
So when schemas changes, we could easily resync the api doc with further details for all classes.
Just would like to know about another question : If I have already got many mangodb collections, any way to automatically generate corresponding schemas for them?
I am seriously considering migrating my project to parse server, and this is a big problem for me.
Sorry for the bothering, I have searched and do found below usage, along with the esm method (our old project used this).
"type": "module"
While I just do not plan to use typescript (not familar with it, and js is better for old project migration), and met below error:
a. “type”: “module”:
Mmmm, Parse use Flow, which is a a thing similar to Typescript. I’m not sure in your case if you’re using the original Parse sources that include Flow.
I’m probably not the best to help you with this. It seems like an issue with project configuration, but I’m not sure.
For the User (_User) schema (Other external table schemas are normal), it could be added to the collection even if data is not confined to the schema (the schema strict: true):