Additional ways of configuring schemas without the use of .env files
As with the code-generated schemas proposal, I've seen many people interested in this feature. Basically, allow the DATABASE_URL environment variable to be used from another file, such as YAML and XML.
Design
My aim is to make this system as easy as possible and as such I thought about this feature as a perfect fit for the Experimental tag. To use it, you'd have to add 2 more keys in your configuration file:
As with any experimental feature, you have to add additionalFormats to enable the feature. The configurations array provides a list of relative paths for the YAML and XML files (by the way, you can suggest more formats!).
In this example, the another.yml file would take priority and override configuration.yml, as it's the one set at the end.
Example
As with all proposals, here's what I think that this configuration could look like:
Additional ways of configuring schemas without the use of .env files
As with the code-generated schemas proposal, I've seen many people interested in this feature. Basically, allow the DATABASE_URL environment variable to be used from another file, such as YAML and XML.
Design
My aim is to make this system as easy as possible and as such I thought about this feature as a perfect fit for the Experimental tag. To use it, you'd have to add 2 more keys in your configuration file:
As with any experimental feature, you have to add
additionalFormats
to enable the feature. Theconfigurations
array provides a list of relative paths for the YAML and XML files (by the way, you can suggest more formats!).In this example, the
another.yml
file would take priority and overrideconfiguration.yml
, as it's the one set at the end.Example
As with all proposals, here's what I think that this configuration could look like:
Wrapping Up
Let me know what you think about this proposal and any improvements you'd like to see!