Skip to content

Commit ad86018

Browse files
committed
Add note on openapi and useGraphModule property + add default value in Helm chart
1 parent a904ae8 commit ad86018

File tree

4 files changed

+49
-25
lines changed

4 files changed

+49
-25
lines changed

api/kubernetes/helm-chart/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ config:
176176
password: changeme
177177
port: 6379
178178
username: default
179+
useGraphModule: true
179180
tls:
180181
enabled: false
181182
bundle: "changeme"

dataset/src/main/kotlin/com/cosmotech/dataset/service/DatasetServiceImpl.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,14 @@ class DatasetServiceImpl(
129129
private val unifiedJedis: UnifiedJedis,
130130
private val csmRbac: CsmRbac,
131131
private val csmAdmin: CsmAdmin,
132-
private val resourceScanner: ResourceScanner,
133-
@Value("\${csm.platform.twincache.useGraphModule}") private val useGraphModule: Boolean
132+
private val resourceScanner: ResourceScanner
134133
) : CsmPhoenixService(), DatasetApiServiceInterface {
135134

135+
@Value("\${csm.platform.twincache.useGraphModule}") private var useGraphModule: Boolean = true
136+
136137
private val notImplementedExceptionMessage =
137138
"The API is not configured to use Graph functionnalities. " +
138-
"This endpoint is deactivated so. " +
139+
"This endpoint is deactivated. " +
139140
"To change that, set the API configuration entry 'csm.platform.twincache.useGraphModule' to true"
140141

141142
override fun findAllDatasets(organizationId: String, page: Int?, size: Int?): List<Dataset> {

dataset/src/main/openapi/dataset.yaml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ paths:
288288
* The id of the edge
289289
290290
All following columns content are up to you.
291+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
291292
requestBody:
292293
required: true
293294
content:
@@ -331,7 +332,9 @@ paths:
331332
tags:
332333
- dataset
333334
summary: Create a sub-dataset from the dataset in parameter
334-
description: Create a copy of the dataset using the results of the list of queries given in parameter.
335+
description: |
336+
Create a copy of the dataset using the results of the list of queries given in parameter.
337+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
335338
requestBody:
336339
description: the Cypher query to filter
337340
required: true
@@ -383,6 +386,7 @@ paths:
383386
Local File (import a new file)
384387
385388
During refresh, datas are overwritten
389+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
386390
responses:
387391
'200':
388392
description: Successful response
@@ -409,7 +413,9 @@ paths:
409413
tags:
410414
- dataset
411415
summary: Rollback the dataset after a failed refresh
412-
description: Rollback the twingraph on a dataset after a failed refresh
416+
description: |
417+
Rollback the twingraph on a dataset after a failed refresh
418+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
413419
responses:
414420
'200':
415421
description: Successful response
@@ -440,7 +446,9 @@ paths:
440446
tags:
441447
- dataset
442448
summary: Return the result of a query made on the graph instance as a json
443-
description: Run a query on a graph instance and return the result as a json
449+
description: |
450+
Run a query on a graph instance and return the result as a json
451+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
444452
requestBody:
445453
description: the query to run
446454
required: true
@@ -489,7 +497,9 @@ paths:
489497
tags:
490498
- dataset
491499
summary: Create new entities in a graph instance
492-
description: create new entities in a graph instance
500+
description: |
501+
Create new entities in a graph instance
502+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
493503
requestBody:
494504
description: the entities to create
495505
required: true
@@ -514,7 +524,9 @@ paths:
514524
tags:
515525
- dataset
516526
summary: Get entities in a graph instance
517-
description: get entities in a graph instance
527+
description: |
528+
Get entities in a graph instance
529+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
518530
parameters:
519531
- name: ids
520532
in: query
@@ -538,7 +550,9 @@ paths:
538550
summary: Update entities in a graph instance
539551
description: update entities in a graph instance
540552
requestBody:
541-
description: the entities to update
553+
description: |
554+
The entities to update
555+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
542556
required: true
543557
content:
544558
application/json:
@@ -561,7 +575,9 @@ paths:
561575
tags:
562576
- dataset
563577
summary: Delete entities in a graph instance
564-
description: delete entities in a graph instance
578+
description: |
579+
Delete entities in a graph instance
580+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
565581
parameters:
566582
- name: ids
567583
in: query
@@ -627,7 +643,9 @@ paths:
627643
tags:
628644
- dataset
629645
summary: "Async batch update by loading a CSV file on a graph instance "
630-
description: "Async batch update by loading a CSV file on a graph instance "
646+
description: |
647+
Async batch update by loading a CSV file on a graph instance
648+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
631649
requestBody:
632650
required: true
633651
content:
@@ -679,7 +697,9 @@ paths:
679697
tags:
680698
- dataset
681699
summary: Run a query on a graph instance and return the result as a zip file in async mode
682-
description: Run a query on a graph instance and return the result as a zip file in async mode
700+
description: |
701+
Run a query on a graph instance and return the result as a zip file in async mode
702+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
683703
requestBody:
684704
description: the query to run
685705
required: true
@@ -716,7 +736,9 @@ paths:
716736
tags:
717737
- dataset
718738
summary: Download a graph as a zip file
719-
description: Download the compressed graph reference by the hash in a zip file
739+
description: |
740+
Download the compressed graph reference by the hash in a zip file
741+
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
720742
responses:
721743
'200':
722744
description: Successful response

doc/Apis/DatasetApi.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Create a new Dataset
151151
152152
Create a sub-dataset from the dataset in parameter
153153

154-
Create a copy of the dataset using the results of the list of queries given in parameter.
154+
Create a copy of the dataset using the results of the list of queries given in parameter. Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
155155

156156
### Parameters
157157

@@ -180,7 +180,7 @@ Create a sub-dataset from the dataset in parameter
180180
181181
Create new entities in a graph instance
182182

183-
create new entities in a graph instance
183+
Create new entities in a graph instance Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
184184

185185
### Parameters
186186

@@ -236,7 +236,7 @@ null (empty response body)
236236
237237
Delete entities in a graph instance
238238

239-
delete entities in a graph instance
239+
Delete entities in a graph instance Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
240240

241241
### Parameters
242242

@@ -266,7 +266,7 @@ null (empty response body)
266266
267267
Download a graph as a zip file
268268

269-
Download the compressed graph reference by the hash in a zip file
269+
Download the compressed graph reference by the hash in a zip file Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
270270

271271
### Parameters
272272

@@ -454,7 +454,7 @@ Get the dataset&#39;s refresh job status
454454
455455
Get entities in a graph instance
456456

457-
get entities in a graph instance
457+
Get entities in a graph instance Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
458458

459459
### Parameters
460460

@@ -511,7 +511,7 @@ Get entities in a graph instance
511511
512512
Refresh data on dataset from dataset&#39;s source
513513

514-
Refresh dataset from parent source. At date, sources can be: dataset (refresh from another dataset) Azure Digital twin Azure storage Local File (import a new file) During refresh, datas are overwritten
514+
Refresh dataset from parent source. At date, sources can be: dataset (refresh from another dataset) Azure Digital twin Azure storage Local File (import a new file) During refresh, datas are overwritten Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
515515

516516
### Parameters
517517

@@ -592,7 +592,7 @@ null (empty response body)
592592
593593
Rollback the dataset after a failed refresh
594594

595-
Rollback the twingraph on a dataset after a failed refresh
595+
Rollback the twingraph on a dataset after a failed refresh Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
596596

597597
### Parameters
598598

@@ -675,7 +675,7 @@ Set the Dataset default security
675675
676676
Run a query on a graph instance and return the result as a zip file in async mode
677677

678-
Run a query on a graph instance and return the result as a zip file in async mode
678+
Run a query on a graph instance and return the result as a zip file in async mode Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
679679

680680
### Parameters
681681

@@ -704,7 +704,7 @@ Run a query on a graph instance and return the result as a zip file in async mod
704704
705705
Async batch update by loading a CSV file on a graph instance
706706

707-
Async batch update by loading a CSV file on a graph instance
707+
Async batch update by loading a CSV file on a graph instance Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
708708

709709
### Parameters
710710

@@ -734,7 +734,7 @@ Async batch update by loading a CSV file on a graph instance
734734
735735
Return the result of a query made on the graph instance as a json
736736

737-
Run a query on a graph instance and return the result as a json
737+
Run a query on a graph instance and return the result as a json Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
738738

739739
### Parameters
740740

@@ -854,7 +854,7 @@ Update entities in a graph instance
854854
| **organization\_id** | **String**| the Organization identifier | [default to null] |
855855
| **dataset\_id** | **String**| the Dataset Identifier | [default to null] |
856856
| **type** | **String**| the entity model type | [default to null] [enum: node, relationship] |
857-
| **GraphProperties** | [**List**](../Models/GraphProperties.md)| the entities to update | |
857+
| **GraphProperties** | [**List**](../Models/GraphProperties.md)| The entities to update Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true | |
858858

859859
### Return type
860860

@@ -875,7 +875,7 @@ Update entities in a graph instance
875875
876876
Upload data from zip file to dataset&#39;s twingraph
877877

878-
To create a new graph from flat files, you need to create a Zip file. This Zip file must countain two folders named Edges and Nodes. .zip hierarchy: *main_folder/Nodes *main_folder/Edges In each folder you can place one or multiple csv files containing your Nodes or Edges data. Your csv files must follow the following header (column name) requirements: The Nodes CSVs requires at least one column (the 1st).Column name &#x3D; &#39;id&#39;. It will represent the nodes ID Ids must be populated with string The Edges CSVs require three columns named, in order, * source * target * id those colomns represent * The source of the edge * The target of the edge * The id of the edge All following columns content are up to you.
878+
To create a new graph from flat files, you need to create a Zip file. This Zip file must countain two folders named Edges and Nodes. .zip hierarchy: *main_folder/Nodes *main_folder/Edges In each folder you can place one or multiple csv files containing your Nodes or Edges data. Your csv files must follow the following header (column name) requirements: The Nodes CSVs requires at least one column (the 1st).Column name &#x3D; &#39;id&#39;. It will represent the nodes ID Ids must be populated with string The Edges CSVs require three columns named, in order, * source * target * id those colomns represent * The source of the edge * The target of the edge * The id of the edge All following columns content are up to you. Note: This endpoint is activated only if &#x60;csm.platform.twincache.useGraphModule&#x60; property is set to true
879879

880880
### Parameters
881881

0 commit comments

Comments
 (0)