pajachiet / pymongo-schema

A schema analyser for MongoDB, written in Python.
GNU Lesser General Public License v3.0
74 stars 13 forks source link

Question about exported schema #35

Open avishaybp81 opened 2 years ago

avishaybp81 commented 2 years ago

Question Is the exported schema is actually Mongo DB schema or its in in another format?

Thanks

andrii0yerko commented 2 years ago

Hello

No, the result it exports is not a valid MongoDB Schema, which is basically BSON extension of json schema. The result has a different format

Also, I believe the purposes of these two things are somewhat different, MongoDB Schema is used to validate inserted documents, while this tool is more for analysis of existing collections, I guess. But I think, it is possible to implement exporting into bson-schema or json-shema format. Maybe you want to try?

avishaybp81 commented 2 years ago

Hi Thanks I think i am going to use a mongo lb named mongodb-schema Thanks

Avishay

On Fri, Sep 16, 2022 at 10:54 PM Andrii @.***> wrote:

Hello

No, the result it exports is not a valid MongoDB Schema, which is basically BSON extension of json schema https://json-schema.org/. The result has a different format

Also, I believe the purposes of these two things are somewhat different, MongoDB Schema is used to validate inserted documents, while this tool is more for analysis of existing collections, I guess. But I think, it is possible to implement exporting into bson-schema or json-shema format. Maybe you want to try?

— Reply to this email directly, view it on GitHub https://github.com/pajachiet/pymongo-schema/issues/35#issuecomment-1249749193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWB6D7Y2AKWVV45ALCJCCN3V6TF6JANCNFSM6AAAAAAQOS52WU . You are receiving this because you authored the thread.Message ID: @.***>