Investigate adding an option to disable the ExamplesFactory #3161
Labels
enhancement
Improvement to existing functionality/feature
rest-api
Specific to/touches a part of the REST API
Milestone
Describe the new feature you'd like
An option to disable the REST ExamplesFactory, disabling the ability for a REST endpoint to generate example JSON.
Why do you want this feature?
When Gaffer starts, the code run by
DefaultExamplesFactory
(in practiceAbstractExamplesFactory.java
) might not be desirable. It's been reported that a lot of output can be logged in some situations. Problems with these factories can also cause an endpoint to crash on startup.Adding a configuration option to disable would avoid these potential issues.
Additional context
For both Jersey and Spring REST, the
DefaultExamplesFactory
is used to provide example JSON. For Jersey this is used in the Swagger UI and the/graph/operations/details
and/graph/operations/details/all
endpoints. For Spring it's used only with the endpoints.For Spring REST, the
DefaultExamplesFactory
is created in FactoryConfig.java. This is a point where new logic could use a dummy factory which produced only empty JSON to in effect disable this capability without requiring many other changes.The text was updated successfully, but these errors were encountered: