Renamed DataSets to Cores, per meeting decision
This commit is contained in:
@@ -14,8 +14,8 @@ tags:
|
|||||||
description: General Database actions.
|
description: General Database actions.
|
||||||
- name: Spaces
|
- name: Spaces
|
||||||
description: Operations on Reference Spaces.
|
description: Operations on Reference Spaces.
|
||||||
- name: Data Sets
|
- name: Cores
|
||||||
description: Operations on Data Sets.
|
description: Operations on Cores.
|
||||||
- name: Spatial Objects
|
- name: Spatial Objects
|
||||||
description: Operations on Spatial Objects.
|
description: Operations on Spatial Objects.
|
||||||
|
|
||||||
@@ -190,15 +190,15 @@ paths:
|
|||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# DATASETS QUERIES
|
# CORE QUERIES
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
/datasets:
|
/cores:
|
||||||
|
|
||||||
post:
|
post:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Retrieve a list of data set names.
|
Retrieve a list of core names.
|
||||||
operationId: post_datasets
|
operationId: post_cores
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/Filters'
|
- $ref: '#/parameters/Filters'
|
||||||
responses:
|
responses:
|
||||||
@@ -210,12 +210,12 @@ paths:
|
|||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
|
|
||||||
put:
|
put:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Create or update multiple data sets at a time.
|
Create or update multiple Cores at a time.
|
||||||
operationId: put_datasets
|
operationId: put_cores
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSets'
|
- $ref: '#/parameters/Cores'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '#/responses/Standard200'
|
$ref: '#/responses/Standard200'
|
||||||
@@ -226,12 +226,12 @@ paths:
|
|||||||
default:
|
default:
|
||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
patch:
|
patch:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Update multiple data sets at a time.
|
Update multiple Cores at a time.
|
||||||
operationId: patch_datasets
|
operationId: patch_cores
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSetPartial'
|
- $ref: '#/parameters/CorePartial'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '#/responses/Standard200'
|
$ref: '#/responses/Standard200'
|
||||||
@@ -242,13 +242,13 @@ paths:
|
|||||||
default:
|
default:
|
||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
delete:
|
delete:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Delete mulltiple data sets at a time. This also removes all the
|
Delete mulltiple Cores at a time. This also removes all the
|
||||||
Spatial Objects tied to these datasets.
|
Spatial Objects tied to these cores.
|
||||||
operationId: delete_datasets
|
operationId: delete_cores
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSetNames'
|
- $ref: '#/parameters/CoreNames'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '#/responses/Standard200'
|
$ref: '#/responses/Standard200'
|
||||||
@@ -259,20 +259,20 @@ paths:
|
|||||||
default:
|
default:
|
||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
|
|
||||||
/datasets/{name}:
|
/cores/{name}:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSetName'
|
- $ref: '#/parameters/CoreName'
|
||||||
|
|
||||||
put:
|
put:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Create or update a data set `name` in the database.
|
Create or update a core `name` in the database.
|
||||||
operationId: put_dataset
|
operationId: put_Core
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSet'
|
- $ref: '#/parameters/Core'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '#/responses/DataSetUpdated200'
|
$ref: '#/responses/CoreUpdated200'
|
||||||
'404':
|
'404':
|
||||||
$ref: '#/responses/Standard404'
|
$ref: '#/responses/Standard404'
|
||||||
'422':
|
'422':
|
||||||
@@ -280,15 +280,15 @@ paths:
|
|||||||
default:
|
default:
|
||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
patch:
|
patch:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Update the properties of the data set `name`.
|
Update the properties of the core `name`.
|
||||||
operationId: patch_dataset
|
operationId: patch_Core
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSetPartial'
|
- $ref: '#/parameters/CorePartial'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '#/responses/DataSetUpdated200'
|
$ref: '#/responses/CoreUpdated200'
|
||||||
'404':
|
'404':
|
||||||
$ref: '#/responses/Standard404'
|
$ref: '#/responses/Standard404'
|
||||||
'422':
|
'422':
|
||||||
@@ -296,41 +296,41 @@ paths:
|
|||||||
default:
|
default:
|
||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
get:
|
get:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Retrieve the data set `name` properties. This does not include
|
Retrieve the core `name` properties. This does not include
|
||||||
the SpatialObjects contained in this dataset.
|
the SpatialObjects contained in this Core.
|
||||||
operationId: get_dataset
|
operationId: get_Core
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '#/responses/DataSet200'
|
$ref: '#/responses/Core200'
|
||||||
'404':
|
'404':
|
||||||
$ref: '#/responses/Standard404'
|
$ref: '#/responses/Standard404'
|
||||||
default:
|
default:
|
||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
delete:
|
delete:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Remove the data set `name`. This also removes all the Spatial
|
Remove the core `name`. This also removes all the Spatial
|
||||||
Objects stored as part of that data set.
|
Objects stored as part of that core.
|
||||||
operationId: delete_dataset
|
operationId: delete_Core
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '#/responses/DataSet200'
|
$ref: '#/responses/Core200'
|
||||||
'404':
|
'404':
|
||||||
$ref: '#/responses/Standard404'
|
$ref: '#/responses/Standard404'
|
||||||
default:
|
default:
|
||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
|
|
||||||
/datasets/{name}/index:
|
/cores/{name}/index:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSetName'
|
- $ref: '#/parameters/CoreName'
|
||||||
|
|
||||||
put:
|
put:
|
||||||
tags: [Data Sets]
|
tags: [Cores]
|
||||||
summary: >
|
summary: >
|
||||||
Rebuild the index of data set `name`.
|
Rebuild the index of core `name`.
|
||||||
operationId: put_dataset_index
|
operationId: put_Core_index
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -342,9 +342,9 @@ paths:
|
|||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# SPATIAL_OBJECTS QUERIES
|
# SPATIAL_OBJECTS QUERIES
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
/datasets/{name}/spatial_objects:
|
/cores/{name}/spatial_objects:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSetName'
|
- $ref: '#/parameters/CoreName'
|
||||||
|
|
||||||
post:
|
post:
|
||||||
tags: [Spatial Objects]
|
tags: [Spatial Objects]
|
||||||
@@ -410,15 +410,15 @@ paths:
|
|||||||
default:
|
default:
|
||||||
$ref: '#/responses/Standard400'
|
$ref: '#/responses/Standard400'
|
||||||
|
|
||||||
/datasets/{name}/spatial_objects/{id}:
|
/cores/{name}/spatial_objects/{id}:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/DataSetName'
|
- $ref: '#/parameters/CoreName'
|
||||||
- $ref: '#/parameters/SpatialObjectId'
|
- $ref: '#/parameters/SpatialObjectId'
|
||||||
|
|
||||||
put:
|
put:
|
||||||
tags: [Spatial Objects]
|
tags: [Spatial Objects]
|
||||||
summary: >
|
summary: >
|
||||||
Create or update a spatial object `id` in the data set `name`.
|
Create or update a spatial object `id` in the core `name`.
|
||||||
operationId: put_spatial_object
|
operationId: put_spatial_object
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/SpatialObject'
|
- $ref: '#/parameters/SpatialObject'
|
||||||
@@ -434,7 +434,7 @@ paths:
|
|||||||
patch:
|
patch:
|
||||||
tags: [Spatial Objects]
|
tags: [Spatial Objects]
|
||||||
summary: >
|
summary: >
|
||||||
Update the spatial object `id` of the data set `name`.
|
Update the spatial object `id` of the core `name`.
|
||||||
operationId: patch_spatial_object
|
operationId: patch_spatial_object
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/SpatialObjectPartial'
|
- $ref: '#/parameters/SpatialObjectPartial'
|
||||||
@@ -450,7 +450,7 @@ paths:
|
|||||||
get:
|
get:
|
||||||
tags: [Spatial Objects]
|
tags: [Spatial Objects]
|
||||||
summary: >
|
summary: >
|
||||||
Retrieve the spatial object `id` of the data set `name`.
|
Retrieve the spatial object `id` of the core `name`.
|
||||||
operationId: get_spatial_object
|
operationId: get_spatial_object
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
@@ -462,7 +462,7 @@ paths:
|
|||||||
delete:
|
delete:
|
||||||
tags: [Spatial Objects]
|
tags: [Spatial Objects]
|
||||||
summary: >
|
summary: >
|
||||||
Remove the spatial object `id` of the data set `name`.
|
Remove the spatial object `id` of the core `name`.
|
||||||
operationId: delete_spatial_object
|
operationId: delete_spatial_object
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
@@ -533,14 +533,14 @@ parameters:
|
|||||||
JSON-serialized value to use to replace the value of the selected attribute.
|
JSON-serialized value to use to replace the value of the selected attribute.
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
DataSet:
|
Core:
|
||||||
name: datasets
|
name: cores
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/DataSet'
|
$ref: '#/definitions/Core'
|
||||||
DataSets:
|
Cores:
|
||||||
name: datasets
|
name: cores
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
@@ -549,16 +549,16 @@ parameters:
|
|||||||
list:
|
list:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/DataSet'
|
$ref: '#/definitions/Core'
|
||||||
DataSetName:
|
CoreName:
|
||||||
name: name
|
name: name
|
||||||
in: path
|
in: path
|
||||||
required: true
|
required: true
|
||||||
description: >
|
description: >
|
||||||
Name of the data set
|
Name of the core
|
||||||
type: string
|
type: string
|
||||||
DataSetNames:
|
CoreNames:
|
||||||
name: datasets
|
name: cores
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
@@ -568,7 +568,7 @@ parameters:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
DataSetPartial:
|
CorePartial:
|
||||||
name: partial_update
|
name: partial_update
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
@@ -715,19 +715,19 @@ responses:
|
|||||||
current:
|
current:
|
||||||
$ref: '#/definitions/SpatialObject'
|
$ref: '#/definitions/SpatialObject'
|
||||||
|
|
||||||
DataSet200:
|
Core200:
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/DataSet'
|
$ref: '#/definitions/Core'
|
||||||
DataSetUpdated200:
|
CoreUpdated200:
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
previous:
|
previous:
|
||||||
$ref: '#/definitions/DataSet'
|
$ref: '#/definitions/Core'
|
||||||
current:
|
current:
|
||||||
$ref: '#/definitions/DataSet'
|
$ref: '#/definitions/Core'
|
||||||
|
|
||||||
Query200:
|
Query200:
|
||||||
description: OK
|
description: OK
|
||||||
@@ -798,8 +798,8 @@ definitions:
|
|||||||
properties:
|
properties:
|
||||||
$ref: '#/definitions/Properties'
|
$ref: '#/definitions/Properties'
|
||||||
|
|
||||||
DataSet:
|
Core:
|
||||||
title: Data Set
|
title: Core
|
||||||
description: >
|
description: >
|
||||||
Collection of Spatial Objects, stored in one or more Reference
|
Collection of Spatial Objects, stored in one or more Reference
|
||||||
Spaces.
|
Spaces.
|
||||||
@@ -908,7 +908,7 @@ definitions:
|
|||||||
be used for specific types to reduce the number of
|
be used for specific types to reduce the number of
|
||||||
vertices required to define the shape.
|
vertices required to define the shape.
|
||||||
type: string
|
type: string
|
||||||
enum: [Point, Hyperrectangle]
|
enum: [Point, Hyperrectangle, Hypersphere]
|
||||||
vertices:
|
vertices:
|
||||||
description: >
|
description: >
|
||||||
List of vertices composing the contour of the shape.
|
List of vertices composing the contour of the shape.
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ pub fn delete((_path, _state): (Path<String>, HttpRequest<AppState>)) -> Result<
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::super::tests::*;
|
use super::super::tests::*;
|
||||||
|
|
||||||
const INSTANCE_EXISTS: &str = "/datasets/42";
|
const INSTANCE_EXISTS: &str = "/cores/42";
|
||||||
const INSTANCE_INVALID: &str = "/datasets/21";
|
const INSTANCE_INVALID: &str = "/cores/21";
|
||||||
|
|
||||||
// FIXME: Add Body to request to see difference between (in)valid bodied requests
|
// FIXME: Add Body to request to see difference between (in)valid bodied requests
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ pub fn delete(_state: &HttpRequest<AppState>) -> Result<fs::NamedFile> {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::super::tests::*;
|
use super::super::tests::*;
|
||||||
|
|
||||||
const COLLECTION: &str = "/datasets";
|
const COLLECTION: &str = "/cores";
|
||||||
|
|
||||||
// FIXME: Add Body to request to see difference between (in)valid bodied requests
|
// FIXME: Add Body to request to see difference between (in)valid bodied requests
|
||||||
|
|
||||||
@@ -33,8 +33,8 @@ mod actions;
|
|||||||
mod space;
|
mod space;
|
||||||
mod spaces;
|
mod spaces;
|
||||||
|
|
||||||
mod dataset;
|
mod core;
|
||||||
mod datasets;
|
mod cores;
|
||||||
|
|
||||||
mod spatial_object;
|
mod spatial_object;
|
||||||
mod spatial_objects;
|
mod spatial_objects;
|
||||||
@@ -75,26 +75,26 @@ fn get_app(
|
|||||||
r.method(Method::DELETE).with(space::delete);
|
r.method(Method::DELETE).with(space::delete);
|
||||||
})
|
})
|
||||||
// DATASETS -------------------------------------------------------------------
|
// DATASETS -------------------------------------------------------------------
|
||||||
.resource("/datasets", |r| {
|
.resource("/cores", |r| {
|
||||||
r.method(Method::POST).f(&datasets::post);
|
r.method(Method::POST).f(&cores::post);
|
||||||
r.method(Method::PUT).f(&datasets::put);
|
r.method(Method::PUT).f(&cores::put);
|
||||||
r.method(Method::PATCH).f(&datasets::patch);
|
r.method(Method::PATCH).f(&cores::patch);
|
||||||
r.method(Method::DELETE).f(&datasets::delete);
|
r.method(Method::DELETE).f(&cores::delete);
|
||||||
})
|
})
|
||||||
.resource("/datasets/{name}", |r| {
|
.resource("/cores/{name}", |r| {
|
||||||
r.method(Method::PUT).with(dataset::put);
|
r.method(Method::PUT).with(core::put);
|
||||||
r.method(Method::GET).with(dataset::get);
|
r.method(Method::GET).with(core::get);
|
||||||
r.method(Method::PATCH).with(dataset::patch);
|
r.method(Method::PATCH).with(core::patch);
|
||||||
r.method(Method::DELETE).with(dataset::delete);
|
r.method(Method::DELETE).with(core::delete);
|
||||||
})
|
})
|
||||||
// SPATIAL OBJECTS -------------------------------------------------------------------
|
// SPATIAL OBJECTS -------------------------------------------------------------------
|
||||||
.resource("/dataset/{name}/spatial_objects", |r| {
|
.resource("/core/{name}/spatial_objects", |r| {
|
||||||
r.method(Method::POST).with(spatial_objects::post);
|
r.method(Method::POST).with(spatial_objects::post);
|
||||||
r.method(Method::PUT).with(spatial_objects::put);
|
r.method(Method::PUT).with(spatial_objects::put);
|
||||||
r.method(Method::PATCH).with(spatial_objects::patch);
|
r.method(Method::PATCH).with(spatial_objects::patch);
|
||||||
r.method(Method::DELETE).with(spatial_objects::delete);
|
r.method(Method::DELETE).with(spatial_objects::delete);
|
||||||
})
|
})
|
||||||
.resource("/dataset/{name}/spatial_objects/{id}", |r| {
|
.resource("/core/{name}/spatial_objects/{id}", |r| {
|
||||||
r.method(Method::PUT).with(spatial_object::put);
|
r.method(Method::PUT).with(spatial_object::put);
|
||||||
r.method(Method::GET).with(spatial_object::get);
|
r.method(Method::GET).with(spatial_object::get);
|
||||||
r.method(Method::PATCH).with(spatial_object::patch);
|
r.method(Method::PATCH).with(spatial_object::patch);
|
||||||
|
|||||||
Reference in New Issue
Block a user