forked from D-Net/dnet-hadoop
This commit is contained in:
parent
b96dedb56b
commit
d0ff2a56fb
|
@ -1,15 +1,19 @@
|
|||
|
||||
package eu.dnetlib.dhp.oa.graph.dump;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.github.victools.jsonschema.generator.*;
|
||||
|
||||
import eu.dnetlib.dhp.schema.dump.oaf.Result;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class GenerateJsonSchema {
|
||||
|
||||
@Test
|
||||
public void generateSchema() {
|
||||
SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_7, OptionPreset.PLAIN_JSON)
|
||||
SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_7,
|
||||
OptionPreset.PLAIN_JSON)
|
||||
.with(Option.SCHEMA_VERSION_INDICATOR)
|
||||
.without(Option.NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS);
|
||||
configBuilder.forFields().withDescriptionResolver(field -> "Description of " + field.getDeclaredName());
|
||||
|
|
Loading…
Reference in New Issue