Closed simonireilly closed 2 years ago
By default compeller should keep an OpenAPI schema document.
It should support hashing the schema JSON file to prevent writing repetitively.
We should encourage a single declaration of the compeller instance in projects.
When the compeller is invoked, it would have a side-effect of writing a file, but, we don't want to do that on readonly file systems such as servers.
Suggest we only allow for dumping when node env is not production, and do a read-only file system check.
Additionally this behaviour should be opt in for the time being.
compeller should take an options object, on option should be to keep an OpenAPI JSON file in sync with compeller.
Possible params,
True, use default relative file
Config, specify file path
By default compeller should keep an OpenAPI schema document.
It should support hashing the schema JSON file to prevent writing repetitively.
We should encourage a single declaration of the compeller instance in projects.
When the compeller is invoked, it would have a side-effect of writing a file, but, we don't want to do that on readonly file systems such as servers.
Suggest we only allow for dumping when node env is not production, and do a read-only file system check.
Additionally this behaviour should be opt in for the time being.
Implementation
compeller should take an options object, on option should be to keep an OpenAPI JSON file in sync with compeller.
Possible params,
True, use default relative file
Config, specify file path