23andMe / Yamale

A schema and validator for YAML.
MIT License
679 stars 88 forks source link

Feature Request: Schema persistance/dump #174

Closed brunocek closed 3 years ago

brunocek commented 3 years ago

Hello.

Well done! Great project! Very useful.

I would like to be able to change a Schema programmatically and then persist it back to a file. May we please have a method to persist Schemas (dump into a file/stream)?

Thank you! Bruno

brunocek commented 3 years ago

Code goes in the line of:

Iterate in schema.dict, schema.includes...dicts stream += yaml.dump( dict , default_flow_style=False, explicit_start=True ) file.write

mildebrandt commented 3 years ago

Hi @brunocek , thanks for using Yamale!

Unfortunately, this use case falls outside of what we'd want to support in this library. If you'd like to write this yourself outside of Yamale, please reach out with any questions you have along the way.