try
{
Gson gson = new GsonBuilder().setFieldNamingStrategy(new SchemaFieldNamingStrategy()).create();
Gson prettyGson = new GsonBuilder().setPrettyPrinting().setFieldNamingStrategy(new SchemaFieldNamingStrategy()).create();
JsonSchemaGeneratorProvider provider = getProvider();
JsonSchemaDocs schemaDocs = new JsonSchemaDocs();
InterfaceList interfaceList = new InterfaceList();
File docsFile = new File(getDefaultDocsFile());
File interfacesFile = new File(getDefaultInterfacesFile());
if (docsFile.exists() && docsFile.canRead())
{
String docsJson = Files.toString(docsFile, Charsets.UTF_8);
schemaDocs = gson.fromJson(docsJson,JsonSchemaDocs.class);
}
if (interfacesFile.exists() && interfacesFile.canRead())
{
String ifaceJson = Files.toString(interfacesFile, Charsets.UTF_8);
interfaceList = gson.fromJson(ifaceJson,InterfaceList.class);
}
JsonSchemaGenerator generator = provider.provide(getEnumCase(enumCase),interfaceList,schemaDocs,ignoreFilter);
JsonSchema schema = generator.generateSchema(getRootClass());
File rawFile = new File(rawOutput);
File prettyFile = new File(prettyOutput);