mff-uk / dataspecer

https://dataspecer.com
MIT License
23 stars 7 forks source link

Enabling/disabling new generators per instance #426

Closed sstenchlak closed 8 months ago

sstenchlak commented 8 months ago

We are constantly adding new generators, forcing us to disable them explicitly in the production instance. However, it makes sense to have generators on by default in a test instance.

The default behavior of each generator for the given instance can be configured (see backend service config), but this configuration is per generator and hence needs to be modified for every new generator.

Therefore, we should introduce a new option, whether all generators are on by default and must be explicitly turned off (in the configuration) or vice versa.

jakubklimek commented 8 months ago

related to #421

sstenchlak commented 8 months ago

Hi @jakubklimek, to disable all generators by default, add into services\backend\main.config.js configuration object following:

{
    configuration: {
        "data-specification": {
            generatorsEnabledByDefault: false,
            useGenerators: {
                json: true,
                plantUML: true,
                respec: true,
                // jsonExample: true,
                // xml: true,
                // csv: true,
                // sparql: true,
                // shacl: true,
                // shex: true,
                // openapi: true,
            }
        }
    }
}