Moved free-resources.json and enables input from data folder (#598)
Change-Id: I6bd271e7bba3cddd2d87afcaf1c50e205f585943
diff --git a/Changes b/Changes
index 73e60b5..a34b4b2 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
# version 0.73.1-SNAPSHOT
+- Fixed jakarta validation error.
+- Added openapi doc (#744)
+- Moved service.properties to src/main/resources/properties
+- Moved free-resources.json to src/main/resources/json
+- Enables inputting free-resources.json from data folder
# version 0.73
diff --git a/src/main/java/de/ids_mannheim/korap/annotation/FreeResourceParser.java b/src/main/java/de/ids_mannheim/korap/annotation/FreeResourceParser.java
index bb7beec..6a6ca88 100644
--- a/src/main/java/de/ids_mannheim/korap/annotation/FreeResourceParser.java
+++ b/src/main/java/de/ids_mannheim/korap/annotation/FreeResourceParser.java
@@ -42,13 +42,13 @@
public void run () throws IOException, KustvaktException {
InputStream is = null;
- File f = new File(FREE_RESOURCE_FILE);
+ File f = new File("data/"+FREE_RESOURCE_FILE);
if (f.exists()) {
is = new FileInputStream(f);
}
else {
is = FreeResourceParser.class.getClassLoader()
- .getResourceAsStream(FREE_RESOURCE_FILE);
+ .getResourceAsStream("json/"+FREE_RESOURCE_FILE);
}
JsonNode node = mapper.readTree(is);
diff --git a/src/main/resources/free-resources.json b/src/main/resources/json/free-resources.json
similarity index 100%
rename from src/main/resources/free-resources.json
rename to src/main/resources/json/free-resources.json