diff --git a/CHANGELOG.md b/CHANGELOG.md
index 970f5a9..781f493 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,11 +1,16 @@
# Change Log
+## [v13.0.0-beta.0](https://github.com/gisaia/arlas-persistence/tree/v13.0.0-beta.0) (2020-07-17)
+
+[Full Changelog](https://github.com/gisaia/arlas-persistence/compare/v12.0.2...v13.0.0-beta.0)
+
## [v12.0.2](https://github.com/gisaia/arlas-persistence/tree/v12.0.2) (2020-05-14)
[Full Changelog](https://github.com/gisaia/arlas-persistence/compare/v12.0.0...v12.0.2)
**Miscellaneous:**
+- \[Firestore\] Make the collection name configurable [\#13](https://github.com/gisaia/ARLAS-persistence/issues/13)
- Property `Creation Date` always return current date instead of the stored one [\#11](https://github.com/gisaia/ARLAS-persistence/issues/11)
## [v12.0.0](https://github.com/gisaia/arlas-persistence/tree/v12.0.0) (2020-03-26)
diff --git a/arlas-persistence-core/pom.xml b/arlas-persistence-core/pom.xml
index ba43fb5..13b8e65 100644
--- a/arlas-persistence-core/pom.xml
+++ b/arlas-persistence-core/pom.xml
@@ -6,14 +6,14 @@
io.arlas
arlas-persistence-core
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
jar
ARLAS persistence server core
io.arlas
arlas-persistence-parent
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
diff --git a/arlas-persistence-rest/pom.xml b/arlas-persistence-rest/pom.xml
index a6930a5..9044d30 100644
--- a/arlas-persistence-rest/pom.xml
+++ b/arlas-persistence-rest/pom.xml
@@ -6,21 +6,21 @@
io.arlas
arlas-persistence-rest
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
jar
ARLAS persistence server rest
io.arlas
arlas-persistence-parent
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
io.arlas
arlas-persistence-core
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
diff --git a/arlas-persistence-rest/src/main/java/io/arlas/persistence/rest/PersistenceRestService.java b/arlas-persistence-rest/src/main/java/io/arlas/persistence/rest/PersistenceRestService.java
index e2a5265..b854b08 100644
--- a/arlas-persistence-rest/src/main/java/io/arlas/persistence/rest/PersistenceRestService.java
+++ b/arlas-persistence-rest/src/main/java/io/arlas/persistence/rest/PersistenceRestService.java
@@ -50,7 +50,7 @@
title = "ARLAS persistence API",
description = "persistence REST services",
license = @License(name = "Apache 2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html"),
- version = "API_VERSION"),
+ version = "13.0.0-beta.0"),
schemes = { SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS })
public class PersistenceRestService {
diff --git a/arlas-persistence-server/pom.xml b/arlas-persistence-server/pom.xml
index 735fe9f..32e7149 100644
--- a/arlas-persistence-server/pom.xml
+++ b/arlas-persistence-server/pom.xml
@@ -5,21 +5,21 @@
4.0.0
io.arlas
arlas-persistence-server
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
jar
ARLAS persistence server
io.arlas
arlas-persistence-parent
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
io.arlas
arlas-persistence-rest
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
diff --git a/arlas-persistence-tests/pom.xml b/arlas-persistence-tests/pom.xml
index d4d2a1b..04b25e7 100644
--- a/arlas-persistence-tests/pom.xml
+++ b/arlas-persistence-tests/pom.xml
@@ -5,14 +5,14 @@
4.0.0
io.arlas
arlas-persistence-tests
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
jar
ARLAS persistence server
io.arlas
arlas-persistence-parent
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
diff --git a/docs/api/definitions.md b/docs/api/definitions.md
index 07712e3..62fb140 100644
--- a/docs/api/definitions.md
+++ b/docs/api/definitions.md
@@ -2,18 +2,6 @@
## Definitions
-
-### Data
-
-|Name|Schema|
-|---|---|
-|**creation_date**
*optional*|string (date-time)|
-|**doc_key**
*required*|string|
-|**doc_type**
*required*|string|
-|**doc_value**
*optional*|string|
-|**id**
*optional*|string|
-
-
### DataResource
@@ -31,11 +19,17 @@
|Name|Schema|
|---|---|
|**_links**
*optional*|< string, [Link](#link) > map|
-|**creation_date**
*optional*|string (date-time)|
+|**doc_entities**
*optional*|< string > array|
|**doc_key**
*required*|string|
-|**doc_type**
*required*|string|
-|**doc_value**
*optional*|string|
+|**doc_organization**
*required*|string|
+|**doc_owner**
*required*|string|
+|**doc_readers**
*optional*|< string > array|
+|**doc_value**
*required*|string|
+|**doc_writers**
*optional*|< string > array|
+|**doc_zone**
*required*|string|
|**id**
*optional*|string|
+|**last_update_date**
*required*|string (date-time)|
+|**updatable**
*optional*|boolean|
diff --git a/docs/api/overview.md b/docs/api/overview.md
index c74084a..f0c69e0 100644
--- a/docs/api/overview.md
+++ b/docs/api/overview.md
@@ -7,7 +7,7 @@ persistence REST services
### Version information
-*Version* : 12.0.1
+*Version* : 13.0.0-beta.0
### Contact information
@@ -28,7 +28,7 @@ persistence REST services
### Tags
-* persistence
+* persist
diff --git a/docs/api/paths.md b/docs/api/paths.md
index b4729b2..774cc68 100644
--- a/docs/api/paths.md
+++ b/docs/api/paths.md
@@ -2,26 +2,68 @@
## Resources
-
-### Persistence
+
+### Persist
-
-#### Store a new piece of data for the provided key (auto generate id)
+
+#### Returns the users' groups allowed to interact with the given zone.
+```
+GET /persist/groups/{zone}
+```
+
+
+##### Description
+Returns the users' groups allowed to interact with the given zone.
+
+
+##### Parameters
+
+|Type|Name|Description|Schema|Default|
+|---|---|---|---|---|
+|**Path**|**zone**
*required*|Zone of the document.|string|`"pref"`|
+|**Query**|**pretty**
*optional*|Pretty print|boolean|`"false"`|
+
+
+##### Responses
+
+|HTTP Code|Description|Schema|
+|---|---|---|
+|**200**|Successful operation|[DataWithLinks](#datawithlinks)|
+|**404**|Zone not found.|[Error](#error)|
+|**500**|Arlas Persistence Error.|[Error](#error)|
+
+
+##### Consumes
+
+* `application/json;charset=utf-8`
+
+
+##### Produces
+
+* `application/json;charset=utf-8`
+
+
+
+#### Update an existing value.
```
-POST /persistence
+PUT /persist/resources/{id}
```
##### Description
-Store a new piece of data for the provided key (auto generate id)
+Update an existing value.
##### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
+|**Path**|**id**
*required*|The id of the data.|string||
+|**Query**|**key**
*optional*|The key of the data.|string||
+|**Query**|**last_update**
*required*|Previous date value of last modification known by client.|integer (int64)||
|**Query**|**pretty**
*optional*|Pretty print|boolean|`"false"`|
-|**Query**|**type**
*required*|Type of the document.|string|`"hibernate"`|
+|**Query**|**readers**
*optional*|Comma separated values of groups authorized to read the data.|< string > array(multi)||
+|**Query**|**writers**
*optional*|Comma separated values of groups authorized to modify the data.|< string > array(multi)||
|**Body**|**value**
*required*|Value to be persisted.|string||
@@ -30,6 +72,45 @@ Store a new piece of data for the provided key (auto generate id)
|HTTP Code|Description|Schema|
|---|---|---|
|**201**|Successful operation|[DataWithLinks](#datawithlinks)|
+|**404**|Key or id not found.|[Error](#error)|
+|**500**|Arlas Server Error.|[Error](#error)|
+
+
+##### Consumes
+
+* `application/json;charset=utf-8`
+
+
+##### Produces
+
+* `application/json;charset=utf-8`
+
+
+
+#### Delete an entry given its key and id.
+```
+DELETE /persist/resources/{id}
+```
+
+
+##### Description
+Delete an entry given its key and id.
+
+
+##### Parameters
+
+|Type|Name|Description|Schema|Default|
+|---|---|---|---|---|
+|**Path**|**id**
*required*|The id of the data.|string||
+|**Query**|**pretty**
*optional*|Pretty print|boolean|`"false"`|
+
+
+##### Responses
+
+|HTTP Code|Description|Schema|
+|---|---|---|
+|**202**|Successful operation|[DataWithLinks](#datawithlinks)|
+|**404**|Key or id not found.|[Error](#error)|
|**500**|Arlas Server Error.|[Error](#error)|
@@ -44,25 +125,25 @@ Store a new piece of data for the provided key (auto generate id)
-#### Fetch a list of data related to a key.
+#### Fetch a list of data related to a zone.
```
-GET /persistence
+GET /persist/resources/{zone}
```
##### Description
-Fetch a list of data related to a key.
+Fetch a list of data related to a zone.
##### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
+|**Path**|**zone**
*required*|Zone of the document.|string|`"pref"`|
|**Query**|**order**
*optional*|Date sort order|enum (desc, asc)|`"desc"`|
|**Query**|**page**
*optional*|Page ID|integer (int32)|`1`|
|**Query**|**pretty**
*optional*|Pretty print|boolean|`"false"`|
|**Query**|**size**
*optional*|Page Size|integer (int32)|`10`|
-|**Query**|**type**
*required*|Type of the document.|string|`"pref"`|
##### Responses
@@ -70,8 +151,8 @@ Fetch a list of data related to a key.
|HTTP Code|Description|Schema|
|---|---|---|
|**200**|Successful operation|[DataResource](#dataresource)|
-|**404**|Key not found.|[Error](#error)|
-|**500**|Arlas Server Error.|[Error](#error)|
+|**404**|Zone not found.|[Error](#error)|
+|**500**|Arlas Persistence Error.|[Error](#error)|
##### Consumes
@@ -84,31 +165,34 @@ Fetch a list of data related to a key.
* `application/json;charset=utf-8`
-
-#### Fetch an entry given its key and id.
+
+#### Store a new piece of data for the provided zone and key (auto generate id).
```
-GET /persistence/{id}
+POST /persist/resources/{zone}/{key}
```
##### Description
-Fetch an entry given its key and id.
+Store a new piece of data for the provided zone and key (auto generate id).
##### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
-|**Path**|**id**
*required*|The id of the data.|string||
+|**Path**|**key**
*required*|The key of the data.|string||
+|**Path**|**zone**
*required*|Zone of the document.|string|`"pref"`|
|**Query**|**pretty**
*optional*|Pretty print|boolean|`"false"`|
+|**Query**|**readers**
*optional*|Comma separated values of groups authorized to read the data.|< string > array(multi)||
+|**Query**|**writers**
*optional*|Comma separated values of groups authorized to modify the data.|< string > array(multi)||
+|**Body**|**value**
*required*|Value to be persisted.|string||
##### Responses
|HTTP Code|Description|Schema|
|---|---|---|
-|**200**|Successful operation|[DataWithLinks](#datawithlinks)|
-|**404**|Key or id not found.|[Error](#error)|
+|**201**|Successful operation|[DataWithLinks](#datawithlinks)|
|**500**|Arlas Server Error.|[Error](#error)|
@@ -122,33 +206,33 @@ Fetch an entry given its key and id.
* `application/json;charset=utf-8`
-
-#### Update an existing value.
+
+#### Fetch an entry given its zone and key.
```
-PUT /persistence/{id}
+GET /persist/resources/{zone}/{key}
```
##### Description
-Update an existing value.
+Fetch an entry given its zone and key.
##### Parameters
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
-|**Path**|**id**
*required*|The id of the data.|string||
+|**Path**|**key**
*required*|The key of the data.|string||
+|**Path**|**zone**
*required*|Zone of the document.|string|`"pref"`|
|**Query**|**pretty**
*optional*|Pretty print|boolean|`"false"`|
-|**Body**|**value**
*required*|Value to be persisted.|string||
##### Responses
|HTTP Code|Description|Schema|
|---|---|---|
-|**201**|Successful operation|[DataWithLinks](#datawithlinks)|
-|**404**|Key or id not found.|[Error](#error)|
-|**500**|Arlas Server Error.|[Error](#error)|
+|**200**|Successful operation|[DataWithLinks](#datawithlinks)|
+|**404**|Key or zone not found.|[Error](#error)|
+|**500**|Arlas Persistence Error.|[Error](#error)|
##### Consumes
@@ -164,7 +248,7 @@ Update an existing value.
#### Delete an entry given its key and id.
```
-DELETE /persistence/{id}
+DELETE /persist/resources/{zone}/{key}
```
@@ -176,7 +260,8 @@ Delete an entry given its key and id.
|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
-|**Path**|**id**
*required*|The id of the data.|string||
+|**Path**|**key**
*required*|The key of the data.|string||
+|**Path**|**zone**
*required*|Zone of the document.|string|`"pref"`|
|**Query**|**pretty**
*optional*|Pretty print|boolean|`"false"`|
@@ -184,8 +269,8 @@ Delete an entry given its key and id.
|HTTP Code|Description|Schema|
|---|---|---|
-|**202**|Successful operation|[Data](#data)|
-|**404**|Key or id not found.|[Error](#error)|
+|**202**|Successful operation|[DataWithLinks](#datawithlinks)|
+|**404**|Zone or key not found.|[Error](#error)|
|**500**|Arlas Server Error.|[Error](#error)|
diff --git a/pom.xml b/pom.xml
index 4d1aa9d..5ba49a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
io.arlas
arlas-persistence-parent
- 12.0.3-SNAPSHOT
+ 13.0.0-beta.0
pom
ARLAS persistence parent
diff --git a/release.sh b/release.sh
index 7f83902..724fd48 100755
--- a/release.sh
+++ b/release.sh
@@ -18,7 +18,7 @@ DOCKER_COMPOSE="${PROJECT_ROOT_DIRECTORY}/docker/docker-files/docker-compose.yml
#########################################
function clean_docker {
echo "===> Stop arlas-persistence-server stack"
- docker-compose -f ${DOCKER_COMPOSE} --project-name arlas down -v
+ docker-compose -f ${DOCKER_COMPOSE} --project-name arlas_persist down -v
}
function clean_exit {
@@ -175,7 +175,7 @@ fi
#########################################
echo "=> Start arlas-persistence-server stack"
-docker-compose -f ${DOCKER_COMPOSE} --project-name arlas up -d --build
+docker-compose -f ${DOCKER_COMPOSE} --project-name arlas_persist up -d --build
DOCKER_IP=$(docker-machine ip || echo "localhost")
echo "=> Wait for arlas-persistence-server up and running"
@@ -187,7 +187,7 @@ i=1; until curl -XGET http://${DOCKER_IP}:19997/arlas_persistence_server/swagger
i=1; until curl -XGET http://${DOCKER_IP}:19997/arlas_persistence_server/swagger.yaml -o target/tmp/swagger.yaml; do if [ $i -lt 60 ]; then sleep 1; else break; fi; i=$(($i + 1)); done
echo "=> Stop arlas-persistence-server stack"
-docker-compose -f ${DOCKER_COMPOSE} --project-name arlas down -v
+docker-compose -f ${DOCKER_COMPOSE} --project-name arlas_persist down -v
echo "=> Generate API documentation"
mvn "-Dswagger.output=docs/api" swagger2markup:convertSwagger2markup