Skip to content

Commit 2b6b1cf

Browse files
Leopold-Cramerjreynard-code
authored andcommitted
update endpoints to assert usability in both json and yaml
1 parent 0ecc6b5 commit 2b6b1cf

File tree

15 files changed

+221
-113
lines changed

15 files changed

+221
-113
lines changed

dataset/src/main/openapi/dataset.yaml

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ paths:
4242
$ref: '#/components/examples/BreweryADT'
4343
application/yaml:
4444
schema:
45-
type: string
46-
format: binary
45+
$ref: '#/components/schemas/Dataset'
4746
examples:
4847
BreweryADT:
4948
$ref: '#/components/examples/BreweryADT'
@@ -131,8 +130,7 @@ paths:
131130
$ref: '#/components/examples/DatasetSearch'
132131
application/yaml:
133132
schema:
134-
type: string
135-
format: binary
133+
$ref: '#/components/schemas/DatasetSearch'
136134
examples:
137135
DatasetSearch:
138136
$ref: '#/components/examples/DatasetSearch'
@@ -174,8 +172,7 @@ paths:
174172
$ref: '#/components/examples/BreweryDatasetCopyParameters'
175173
application/yaml:
176174
schema:
177-
type: string
178-
format: binary
175+
$ref: '#/components/schemas/DatasetCopyParameters'
179176
examples:
180177
BreweryDatasetCopyParameters:
181178
$ref: '#/components/examples/BreweryDatasetCopyParameters'
@@ -230,7 +227,11 @@ paths:
230227
- dataset
231228
summary: Update a dataset
232229
requestBody:
233-
description: the new Dataset details. This endpoint can't be used to update security
230+
description: |
231+
The new Dataset details.
232+
This endpoint can't be used to update :
233+
- id
234+
- security
234235
required: true
235236
content:
236237
application/json:
@@ -241,8 +242,7 @@ paths:
241242
$ref: '#/components/examples/BreweryADTUpdate'
242243
application/yaml:
243244
schema:
244-
type: string
245-
format: binary
245+
$ref: '#/components/schemas/Dataset'
246246
examples:
247247
BreweryADTUpdate:
248248
$ref: '#/components/examples/BreweryADTUpdate'
@@ -350,6 +350,12 @@ paths:
350350
examples:
351351
BreweryADT:
352352
$ref: '#/components/examples/BreweryADT'
353+
application/yaml:
354+
schema:
355+
$ref: '#/components/schemas/SubDatasetGraphQuery'
356+
examples:
357+
BreweryADT:
358+
$ref: '#/components/examples/BreweryADT'
353359
responses:
354360
'200':
355361
description: Successful response
@@ -464,6 +470,12 @@ paths:
464470
examples:
465471
GetAllNodes:
466472
$ref: '#/components/examples/TwinGraphGetAllNodes'
473+
application/yaml:
474+
schema:
475+
$ref: '#/components/schemas/DatasetTwinGraphQuery'
476+
examples:
477+
GetAllNodes:
478+
$ref: '#/components/examples/TwinGraphGetAllNodes'
467479
responses:
468480
'200':
469481
description: Successful response
@@ -517,6 +529,14 @@ paths:
517529
examples:
518530
QueryEntities:
519531
$ref: '#/components/examples/QueryEntities'
532+
application/yaml:
533+
schema:
534+
type: array
535+
items:
536+
$ref: '#/components/schemas/GraphProperties'
537+
examples:
538+
QueryEntities:
539+
$ref: '#/components/examples/QueryEntities'
520540
responses:
521541
'200':
522542
description: Successful response
@@ -568,6 +588,14 @@ paths:
568588
examples:
569589
QueryEntities:
570590
$ref: '#/components/examples/QueryEntities'
591+
application/yaml:
592+
schema:
593+
type: array
594+
items:
595+
$ref: '#/components/schemas/GraphProperties'
596+
examples:
597+
QueryEntities:
598+
$ref: '#/components/examples/QueryEntities'
571599
responses:
572600
'200':
573601
description: Successful response
@@ -647,7 +675,7 @@ paths:
647675
operationId: twingraphBatchUpdate
648676
tags:
649677
- dataset
650-
summary: "Async batch update by loading a CSV file on a graph instance "
678+
summary: Async batch update by loading a CSV file on a graph instance
651679
description: |
652680
Async batch update by loading a CSV file on a graph instance
653681
Note: This endpoint is activated only if `csm.platform.twincache.useGraphModule` property is set to true
@@ -916,8 +944,7 @@ paths:
916944
$ref: '#/components/examples/BreweryDatasetRole'
917945
application/yaml:
918946
schema:
919-
type: string
920-
format: binary
947+
$ref: '#/components/schemas/DatasetRole'
921948
examples:
922949
BreweryDatasetRole:
923950
$ref: '#/components/examples/BreweryDatasetRole'
@@ -961,8 +988,7 @@ paths:
961988
$ref: '#/components/examples/BreweryDatasetAccessControl'
962989
application/yaml:
963990
schema:
964-
type: string
965-
format: binary
991+
$ref: '#/components/schemas/DatasetAccessControl'
966992
examples:
967993
DatasetAccess:
968994
$ref: '#/components/examples/BreweryDatasetAccessControl'

doc/Apis/DatasetApi.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ All URIs are relative to *https://dev.api.cosmotech.com*
2828
| [**searchDatasets**](DatasetApi.md#searchDatasets) | **POST** /organizations/{organization_id}/datasets/search | Search Datasets by tags |
2929
| [**setDatasetDefaultSecurity**](DatasetApi.md#setDatasetDefaultSecurity) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/security/default | Set the Dataset default security |
3030
| [**twingraphBatchQuery**](DatasetApi.md#twingraphBatchQuery) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/batch-query | Run a query on a graph instance and return the result as a zip file in async mode |
31-
| [**twingraphBatchUpdate**](DatasetApi.md#twingraphBatchUpdate) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/batch | Async batch update by loading a CSV file on a graph instance |
31+
| [**twingraphBatchUpdate**](DatasetApi.md#twingraphBatchUpdate) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/batch | Async batch update by loading a CSV file on a graph instance |
3232
| [**twingraphQuery**](DatasetApi.md#twingraphQuery) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/twingraph | Return the result of a query made on the graph instance as a json |
3333
| [**unlinkWorkspace**](DatasetApi.md#unlinkWorkspace) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/unlink | |
3434
| [**updateDataset**](DatasetApi.md#updateDataset) | **PATCH** /organizations/{organization_id}/datasets/{dataset_id} | Update a dataset |
@@ -171,7 +171,7 @@ Create a sub-dataset from the dataset in parameter
171171

172172
### HTTP request headers
173173

174-
- **Content-Type**: application/json
174+
- **Content-Type**: application/json, application/yaml
175175
- **Accept**: application/json
176176

177177
<a name="createTwingraphEntities"></a>
@@ -201,7 +201,7 @@ Create new entities in a graph instance
201201

202202
### HTTP request headers
203203

204-
- **Content-Type**: application/json
204+
- **Content-Type**: application/json, application/yaml
205205
- **Accept**: application/json
206206

207207
<a name="deleteDataset"></a>
@@ -702,7 +702,7 @@ Run a query on a graph instance and return the result as a zip file in async mod
702702
# **twingraphBatchUpdate**
703703
> TwinGraphBatchResult twingraphBatchUpdate(organization\_id, dataset\_id, twinGraphQuery, body)
704704
705-
Async batch update by loading a CSV file on a graph instance
705+
Async batch update by loading a CSV file on a graph instance
706706

707707
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

@@ -754,7 +754,7 @@ Return the result of a query made on the graph instance as a json
754754

755755
### HTTP request headers
756756

757-
- **Content-Type**: application/json
757+
- **Content-Type**: application/json, application/yaml
758758
- **Accept**: application/json
759759

760760
<a name="unlinkWorkspace"></a>
@@ -796,7 +796,7 @@ Update a dataset
796796
|------------- | ------------- | ------------- | -------------|
797797
| **organization\_id** | **String**| the Organization identifier | [default to null] |
798798
| **dataset\_id** | **String**| the Dataset identifier | [default to null] |
799-
| **Dataset** | [**Dataset**](../Models/Dataset.md)| the new Dataset details. This endpoint can&#39;t be used to update security | |
799+
| **Dataset** | [**Dataset**](../Models/Dataset.md)| The new Dataset details. This endpoint can&#39;t be used to update : - id - security | |
800800

801801
### Return type
802802

@@ -866,7 +866,7 @@ Update entities in a graph instance
866866

867867
### HTTP request headers
868868

869-
- **Content-Type**: application/json
869+
- **Content-Type**: application/json, application/yaml
870870
- **Accept**: application/json
871871

872872
<a name="uploadTwingraph"></a>

doc/Apis/OrganizationApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ Update an Organization
337337
|Name | Type | Description | Notes |
338338
|------------- | ------------- | ------------- | -------------|
339339
| **organization\_id** | **String**| the Organization identifier | [default to null] |
340-
| **Organization** | [**Organization**](../Models/Organization.md)| the new Organization details. This endpoint can&#39;t be used to update security | |
340+
| **Organization** | [**Organization**](../Models/Organization.md)| The new Organization details. This endpoint can&#39;t be used to update : - id - ownerId - security | |
341341

342342
### Return type
343343

@@ -376,7 +376,7 @@ Update the specified access to User for an Organization
376376

377377
### HTTP request headers
378378

379-
- **Content-Type**: application/json
379+
- **Content-Type**: application/json, application/yaml
380380
- **Accept**: application/json
381381

382382
<a name="updateSolutionsContainerRegistryByOrganizationId"></a>
@@ -454,6 +454,6 @@ Update tenant credentials for the Organization specified
454454

455455
### HTTP request headers
456456

457-
- **Content-Type**: application/json
458-
- **Accept**: application/json
457+
- **Content-Type**: application/json, application/yaml
458+
- **Accept**: application/json, application/yaml
459459

doc/Apis/RunApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ query the run data
180180

181181
### HTTP request headers
182182

183-
- **Content-Type**: application/json
183+
- **Content-Type**: application/json, application/yaml
184184
- **Accept**: application/json
185185

186186
<a name="sendRunData"></a>
@@ -209,6 +209,6 @@ Send data associated to a run
209209

210210
### HTTP request headers
211211

212-
- **Content-Type**: application/json
212+
- **Content-Type**: application/json, application/yaml
213213
- **Accept**: application/json
214214

doc/Apis/RunnerApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Update a runner
391391
| **organization\_id** | **String**| the Organization identifier | [default to null] |
392392
| **workspace\_id** | **String**| the Workspace identifier | [default to null] |
393393
| **runner\_id** | **String**| the Runner identifier | [default to null] |
394-
| **Runner** | [**Runner**](../Models/Runner.md)| the new Runner details. This endpoint can&#39;t be used to update &#39;:&#39; - id - ownerId - organizationId - workspaceId - creationDate - security | |
394+
| **Runner** | [**Runner**](../Models/Runner.md)| The new Runner details. This endpoint can&#39;t be used to update : - id - ownerId - organizationId - workspaceId - creationDate - security | |
395395

396396
### Return type
397397

@@ -432,6 +432,6 @@ Update the specified access to User for a Runner
432432

433433
### HTTP request headers
434434

435-
- **Content-Type**: application/json
435+
- **Content-Type**: application/json, application/yaml
436436
- **Accept**: application/json
437437

doc/Apis/ScenarioApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Add (or replace) Parameter Values for the Scenario specified
5353

5454
### HTTP request headers
5555

56-
- **Content-Type**: application/json
56+
- **Content-Type**: application/json, application/yaml
5757
- **Accept**: application/json
5858

5959
<a name="addScenarioAccessControl"></a>
@@ -590,7 +590,7 @@ Update a scenario
590590
| **organization\_id** | **String**| the Organization identifier | [default to null] |
591591
| **workspace\_id** | **String**| the Workspace identifier | [default to null] |
592592
| **scenario\_id** | **String**| the Scenario identifier | [default to null] |
593-
| **Scenario** | [**Scenario**](../Models/Scenario.md)| the new Scenario details. This endpoint can&#39;t be used to update &#39;:&#39; - id - ownerId - datasetList - solutionId - runTemplateId - parametersValues - security | |
593+
| **Scenario** | [**Scenario**](../Models/Scenario.md)| The new Scenario details. This endpoint can&#39;t be used to update : - id - ownerId - datasetList - solutionId - runTemplateId - parametersValues - security | |
594594

595595
### Return type
596596

@@ -631,6 +631,6 @@ Update the specified access to User for a Scenario
631631

632632
### HTTP request headers
633633

634-
- **Content-Type**: application/json
634+
- **Content-Type**: application/json, application/yaml
635635
- **Accept**: application/json
636636

doc/Apis/SolutionApi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Add Parameter Groups. Any item with the same ID will be overwritten
5252

5353
### HTTP request headers
5454

55-
- **Content-Type**: application/json
55+
- **Content-Type**: application/json, application/yaml
5656
- **Accept**: application/json
5757

5858
<a name="addOrReplaceParameters"></a>
@@ -79,7 +79,7 @@ Add Parameters. Any item with the same ID will be overwritten
7979

8080
### HTTP request headers
8181

82-
- **Content-Type**: application/json
82+
- **Content-Type**: application/json, application/yaml
8383
- **Accept**: application/json
8484

8585
<a name="addOrReplaceRunTemplates"></a>
@@ -106,7 +106,7 @@ Add Run Templates. Any item with the same ID will be overwritten
106106

107107
### HTTP request headers
108108

109-
- **Content-Type**: application/json
109+
- **Content-Type**: application/json, application/yaml
110110
- **Accept**: application/json
111111

112112
<a name="addSolutionAccessControl"></a>
@@ -519,7 +519,7 @@ Update a solution
519519
|------------- | ------------- | ------------- | -------------|
520520
| **organization\_id** | **String**| the Organization identifier | [default to null] |
521521
| **solution\_id** | **String**| the Solution identifier | [default to null] |
522-
| **Solution** | [**Solution**](../Models/Solution.md)| the new Solution details. This endpoint can&#39;t be used to update &#39;:&#39; - id - runTemplates - security | |
522+
| **Solution** | [**Solution**](../Models/Solution.md)| the new Solution details. This endpoint can&#39;t be used to update : - id - runTemplates - security | |
523523

524524
### Return type
525525

@@ -559,7 +559,7 @@ Update the specified access to User for a Solution
559559

560560
### HTTP request headers
561561

562-
- **Content-Type**: application/json
562+
- **Content-Type**: application/json, application/yaml
563563
- **Accept**: application/json
564564

565565
<a name="updateSolutionRunTemplate"></a>

doc/Apis/WorkspaceApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ Update a workspace
518518
|------------- | ------------- | ------------- | -------------|
519519
| **organization\_id** | **String**| the Organization identifier | [default to null] |
520520
| **workspace\_id** | **String**| the Workspace identifier | [default to null] |
521-
| **Workspace** | [**Workspace**](../Models/Workspace.md)| The new Workspace details. This endpoint can&#39;t be used to update &#39;:&#39; - id - ownerId - security | |
521+
| **Workspace** | [**Workspace**](../Models/Workspace.md)| The new Workspace details. This endpoint can&#39;t be used to update : - id - ownerId - security | |
522522

523523
### Return type
524524

@@ -558,7 +558,7 @@ Update the specified access to User for a Workspace
558558

559559
### HTTP request headers
560560

561-
- **Content-Type**: application/json
561+
- **Content-Type**: application/json, application/yaml
562562
- **Accept**: application/json
563563

564564
<a name="uploadWorkspaceFile"></a>

doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ All URIs are relative to *https://dev.api.cosmotech.com*
3636
*DatasetApi* | [**searchDatasets**](Apis/DatasetApi.md#searchdatasets) | **POST** /organizations/{organization_id}/datasets/search | Search Datasets by tags |
3737
*DatasetApi* | [**setDatasetDefaultSecurity**](Apis/DatasetApi.md#setdatasetdefaultsecurity) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/security/default | Set the Dataset default security |
3838
*DatasetApi* | [**twingraphBatchQuery**](Apis/DatasetApi.md#twingraphbatchquery) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/batch-query | Run a query on a graph instance and return the result as a zip file in async mode |
39-
*DatasetApi* | [**twingraphBatchUpdate**](Apis/DatasetApi.md#twingraphbatchupdate) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/batch | Async batch update by loading a CSV file on a graph instance |
39+
*DatasetApi* | [**twingraphBatchUpdate**](Apis/DatasetApi.md#twingraphbatchupdate) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/batch | Async batch update by loading a CSV file on a graph instance |
4040
*DatasetApi* | [**twingraphQuery**](Apis/DatasetApi.md#twingraphquery) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/twingraph | Return the result of a query made on the graph instance as a json |
4141
*DatasetApi* | [**unlinkWorkspace**](Apis/DatasetApi.md#unlinkworkspace) | **POST** /organizations/{organization_id}/datasets/{dataset_id}/unlink | |
4242
*DatasetApi* | [**updateDataset**](Apis/DatasetApi.md#updatedataset) | **PATCH** /organizations/{organization_id}/datasets/{dataset_id} | Update a dataset |

0 commit comments

Comments
 (0)