simonireilly / compeller

A strong typescript binding for your OpenAPI Schema that doesn't need generation and is not prescriptive in coding style
MIT License
22 stars 1 forks source link

feat: OpenAPI specification as json #15

Closed simonireilly closed 2 years ago

simonireilly commented 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.

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