This commit is contained in:
Miriam Baglioni 2020-08-11 15:42:35 +02:00
parent a169d7e7c1
commit 7dfd56df9d
3 changed files with 7 additions and 6 deletions

View File

@ -1,12 +1,12 @@
package eu.dnetlib.dhp.oa.graph.dump;
import eu.dnetlib.dhp.schema.dump.oaf.graph.*;
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.community.CommunityResult;
public class GenerateJsonSchema {
@ -19,7 +19,7 @@ public class GenerateJsonSchema {
configBuilder.forFields().withDescriptionResolver(field -> "Description of " + field.getDeclaredName());
SchemaGeneratorConfig config = configBuilder.build();
SchemaGenerator generator = new SchemaGenerator(config);
JsonNode jsonSchema = generator.generateSchema(CommunityResult.class);
JsonNode jsonSchema = generator.generateSchema(Relation.class);
System.out.println(jsonSchema.toString());
}

View File

@ -1,3 +1,4 @@
package eu.dnetlib.dhp.oa.graph.dump;
import java.io.IOException;
@ -94,8 +95,8 @@ public class SplitForCommunityTest {
.getPath();
final String communityMapPath = getClass()
.getResource("/eu/dnetlib/dhp/oa/graph/dump/communityMapPath/communitymap.json")
.getPath();
.getResource("/eu/dnetlib/dhp/oa/graph/dump/communityMapPath/communitymap.json")
.getPath();
CommunitySplit split = new CommunitySplit();

View File

@ -22,7 +22,7 @@ public class ZenodoUploadTest {
private static String workingDir;
private final String URL_STRING = "https://sandbox.zenodo.org/api/deposit/depositions";
private final String ACCESS_TOKEN = "5ImUj0VC1ICg4ifK5dc3AGzJhcfAB4osxrFlsr8WxHXxjaYgCE0hY8HZcDoe";
private final String ACCESS_TOKEN = "";
@BeforeAll
public static void beforeAll() throws IOException {
@ -143,7 +143,7 @@ public class ZenodoUploadTest {
.println(
new Gson()
.toJson(
SendToZenodoHDFS
Utils
.readCommunityMap(
fs, getClass()
.getResource("/eu/dnetlib/dhp/oa/graph/dump/communityMapPath/communitymap.json")