Skip to content
Snippets Groups Projects
Verified Commit 6a9b86db authored by Timm Fitschen's avatar Timm Fitschen
Browse files

REL: 0.1.0-rc2

parent 0e33dac6
Branches
No related tags found
No related merge requests found
Pipeline #48787 passed
......@@ -4,7 +4,7 @@
<parent>
<groupId>com.indiscale.fdo</groupId>
<artifactId>fdo-manager-service</artifactId>
<version>0.1.0-rc1</version>
<version>0.1.0-rc2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
......
openapi: "3.1.0"
info:
version: '0.1'
title: 'FDO Manager Service API'
description: "The FDO Manager Service API for creating FAIR Digital Objects."
contact:
name: IndiScale GmbH
email: t.fitschen@indiscale.com
url: https://www.indiscale.com
servers:
- url: http://localhost:8080
tags:
- name: Repositories
description: Repositories for storing FDO data and metadata.
- name: Profiles
description: FDO Profiles specify the attributes of FDOs.
- name: Logging
description: Logging of operations handled by this FDO Manager Service Instance.
- name: FDOs
description: Fair Digital Objects.
- name: Info
description: General information about the Service.
paths:
/logging:
get:
tags:
- Logging
description: "List latest log events"
operationId: listLogEvents
parameters:
- in: query
name: "page[number]"
schema:
type: integer
default: 0
- in: query
name: "page[size]"
schema:
type: integer
default: 100
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/OperationsLogRecord'
links:
$ref: '#/components/schemas/PaginationLinks'
/profiles:
get:
tags:
- Profiles
description: "List known profiles."
operationId: listProfiles
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Profile'
links:
$ref: '#/components/schemas/Links'
/profiles/{profileId}:
get:
tags:
- Profiles
description: "Get information on a single profile."
operationId: getProfile
parameters:
- name: profileId
in: path
description: "Profile ID"
required: true
schema:
$ref: '#/components/schemas/ProfileID'
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
required: ["data"]
properties:
data:
$ref: '#/components/schemas/Profile'
links:
$ref: '#/components/schemas/Links'
"404":
description: "Unknown profile id."
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/hello:
get:
tags:
- Info
description: Say hello to the server.
operationId: hello
responses:
"200":
description: A hello from the server.
content:
application/json:
schema:
$ref: '#/components/schemas/Hello'
/info:
get:
tags:
- Info
description: Retrieve general information on the service.
operationId: getInfo
responses:
"200":
description: General service information.
content:
application/json:
schema:
type: object
required: ["data"]
properties:
data:
$ref: "#/components/schemas/Info"
links:
$ref: '#/components/schemas/Links'
/repositories:
get:
tags:
- Repositories
description: "List trusted repositories."
operationId: listRepositories
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Repository'
links:
$ref: '#/components/schemas/Links'
/repositories/{repositoryId}:
get:
tags:
- Repositories
description: "Get information on a single repository."
operationId: getRepository
parameters:
- name: repositoryId
in: path
description: "Repository ID"
required: true
schema:
$ref: '#/components/schemas/RepositoryID'
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
required: ["data"]
properties:
data:
$ref: '#/components/schemas/Repository'
links:
$ref: '#/components/schemas/Links'
"404":
description: "Unknown repository id."
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/fdo:
post:
tags:
- FDOs
description: "Create an FDO."
operationId: createFDO
requestBody:
content:
multipart/form-data:
schema:
type: object
required: ["repositories", "data", "metadata"]
properties:
repositories:
$ref: "#/components/schemas/TargetRepositories"
data:
type: string
format: binary
metadata:
type: string
format: binary
responses:
"201":
description: "The Location header points to the newly created FDO."
/fdo/{prefix}/{suffix}:
get:
tags:
- FDOs
description: "Resolve a pid."
operationId: "resolvePID"
parameters:
- $ref: '#/components/parameters/Prefix'
- $ref: '#/components/parameters/Suffix'
responses:
"200":
description: "A successfully resolved pid."
content:
application/json:
schema:
type: object
required: ["data"]
properties:
data:
$ref: '#/components/schemas/DigitalObject'
links:
$ref: '#/components/schemas/Links'
"404":
description: "Could not resolve pid."
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
OperationsLogRecord:
type: object
properties:
id:
type: string
type:
type: string
const: "OperationsLogRecord"
attributes:
type: object
properties:
operation:
type: string
enum: ["Op.Create"]
timestamp:
type: string
format: date-time
repositories:
$ref: '#/components/schemas/TargetRepositories'
fdo:
$ref: '#/components/schemas/DigitalObject'
links:
$ref: '#/components/schemas/SelfLink'
TargetRepositories:
type: object
properties:
fdo:
type: string
metadata:
type: string
data:
type: string
SelfLink:
type: object
properties:
self:
type: string
nullable: true
PaginationLinks:
type: object
properties:
self:
type: string
format: uri
first:
type: string
format: uri
prev:
type: string
format: uri
next:
type: string
format: uri
last:
type: string
format: uri
Links:
type: object
properties:
self:
type: string
nullable: true
collection:
type: string
nullable: true
Error:
type: object
required: ["detail", "status"]
properties:
detail:
type: string
nullable: true
status:
type: string
nullable: true
RepositoryID:
type: string
nullable: true
examples:
- "gwdg-cordra-1"
- "fdo.indiscale.com"
- "b2share@gwdg"
Repository:
type: object
properties:
id:
$ref: '#/components/schemas/RepositoryID'
links:
$ref: '#/components/schemas/Links'
ProfileID:
type: string
nullable: true
Profile:
type: object
properties:
id:
$ref: '#/components/schemas/ProfileID'
links:
$ref: '#/components/schemas/Links'
Hello:
type: object
properties:
message:
type: string
example: 'Hello marie.curie@sorbonne-universite.fr. This is FDO Manager Service v0.1-SNAPSHOT/API v0.1'
default: 'Hello anonymous. This is FDO Manager Service v0.1-SNAPSHOT/API v0.1'
DigitalObject:
type: object
required: ["pid", "isFdo"]
properties:
pid:
type: string
isFdo:
type: boolean
dataPid:
type: string
metadataPid:
type: string
Info:
type: object
properties:
fdoServiceVersion:
type: string
fdoSdkVersion:
type: string
serviceProvider:
type: string
links:
$ref: '#/components/schemas/SelfLink'
parameters:
Prefix:
name: prefix
in: path
description: "Persistent Identifier Prefix"
required: true
schema:
type: string
Suffix:
name: suffix
in: path
description: "Persistent Identifier Suffix"
required: true
schema:
type: string
openapi: "3.1.0"
info:
version: '0.1'
title: 'FDO Manager Service API'
description: "The FDO Manager Service API for creating FAIR Digital Objects."
contact:
name: IndiScale GmbH
email: t.fitschen@indiscale.com
url: https://www.indiscale.com
servers:
- url: http://localhost:8080
tags:
- name: Repositories
description: Repositories for storing FDO data and metadata.
- name: Profiles
description: FDO Profiles specify the attributes of FDOs.
- name: Logging
description: Logging of operations handled by this FDO Manager Service Instance.
- name: FDOs
description: Fair Digital Objects.
- name: Info
description: General information about the Service.
paths:
/logging:
get:
tags:
- Logging
description: "List latest log events"
operationId: listLogEvents
parameters:
- in: query
name: "page[number]"
schema:
type: integer
default: 0
- in: query
name: "page[size]"
schema:
type: integer
default: 100
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/OperationsLogRecord'
links:
$ref: '#/components/schemas/PaginationLinks'
/profiles:
get:
tags:
- Profiles
description: "List known profiles."
operationId: listProfiles
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Profile'
links:
$ref: '#/components/schemas/Links'
/profiles/{profileId}:
get:
tags:
- Profiles
description: "Get information on a single profile."
operationId: getProfile
parameters:
- name: profileId
in: path
description: "Profile ID"
required: true
schema:
$ref: '#/components/schemas/ProfileID'
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
required: ["data"]
properties:
data:
$ref: '#/components/schemas/Profile'
links:
$ref: '#/components/schemas/Links'
"404":
description: "Unknown profile id."
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/hello:
get:
tags:
- Info
description: Say hello to the server.
operationId: hello
responses:
"200":
description: A hello from the server.
content:
application/json:
schema:
$ref: '#/components/schemas/Hello'
/info:
get:
tags:
- Info
description: Retrieve general information on the service.
operationId: getInfo
responses:
"200":
description: General service information.
content:
application/json:
schema:
type: object
required: ["data"]
properties:
data:
$ref: "#/components/schemas/Info"
links:
$ref: '#/components/schemas/Links'
/repositories:
get:
tags:
- Repositories
description: "List trusted repositories."
operationId: listRepositories
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Repository'
links:
$ref: '#/components/schemas/Links'
/repositories/{repositoryId}:
get:
tags:
- Repositories
description: "Get information on a single repository."
operationId: getRepository
parameters:
- name: repositoryId
in: path
description: "Repository ID"
required: true
schema:
$ref: '#/components/schemas/RepositoryID'
responses:
"200":
description: "Success."
content:
application/json:
schema:
type: object
required: ["data"]
properties:
data:
$ref: '#/components/schemas/Repository'
links:
$ref: '#/components/schemas/Links'
"404":
description: "Unknown repository id."
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/fdo:
post:
tags:
- FDOs
description: "Create an FDO."
operationId: createFDO
requestBody:
content:
multipart/form-data:
schema:
type: object
required: ["repositories", "data", "metadata"]
properties:
repositories:
$ref: "#/components/schemas/TargetRepositories"
data:
type: string
format: binary
metadata:
type: string
format: binary
responses:
"201":
description: "The Location header points to the newly created FDO."
/fdo/{prefix}/{suffix}:
get:
tags:
- FDOs
description: "Resolve a pid."
operationId: "resolvePID"
parameters:
- $ref: '#/components/parameters/Prefix'
- $ref: '#/components/parameters/Suffix'
responses:
"200":
description: "A successfully resolved pid."
content:
application/json:
schema:
type: object
required: ["data"]
properties:
data:
$ref: '#/components/schemas/DigitalObject'
links:
$ref: '#/components/schemas/Links'
"404":
description: "Could not resolve pid."
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
OperationsLogRecord:
type: object
properties:
id:
type: string
type:
type: string
const: "OperationsLogRecord"
attributes:
type: object
properties:
operation:
type: string
enum: ["Op.Create"]
timestamp:
type: string
format: date-time
repositories:
$ref: '#/components/schemas/TargetRepositories'
fdo:
$ref: '#/components/schemas/DigitalObject'
links:
$ref: '#/components/schemas/SelfLink'
TargetRepositories:
type: object
properties:
fdo:
type: string
metadata:
type: string
data:
type: string
SelfLink:
type: object
properties:
self:
type: string
nullable: true
PaginationLinks:
type: object
properties:
self:
type: string
format: uri
first:
type: string
format: uri
prev:
type: string
format: uri
next:
type: string
format: uri
last:
type: string
format: uri
Links:
type: object
properties:
self:
type: string
nullable: true
collection:
type: string
nullable: true
Error:
type: object
required: ["detail", "status"]
properties:
detail:
type: string
nullable: true
status:
type: string
nullable: true
RepositoryID:
type: string
nullable: true
examples:
- "gwdg-cordra-1"
- "fdo.indiscale.com"
- "b2share@gwdg"
Repository:
type: object
properties:
id:
$ref: '#/components/schemas/RepositoryID'
type:
type: string
enum: ["Repository"]
attributes:
type: object
properties:
description:
type: string
maintainer:
type: string
attributes:
type: object
additionalProperties: true
links:
$ref: '#/components/schemas/Links'
ProfileID:
type: string
nullable: true
Profile:
type: object
properties:
id:
$ref: '#/components/schemas/ProfileID'
links:
$ref: '#/components/schemas/Links'
Hello:
type: object
properties:
message:
type: string
example: 'Hello marie.curie@sorbonne-universite.fr. This is FDO Manager Service v0.1-SNAPSHOT/API v0.1'
default: 'Hello anonymous. This is FDO Manager Service v0.1-SNAPSHOT/API v0.1'
DigitalObject:
type: object
required: ["pid", "isFdo"]
properties:
pid:
type: string
isFdo:
type: boolean
dataPid:
type: string
metadataPid:
type: string
Info:
type: object
properties:
fdoServiceVersion:
type: string
fdoSdkVersion:
type: string
serviceProvider:
type: string
links:
$ref: '#/components/schemas/SelfLink'
parameters:
Prefix:
name: prefix
in: path
description: "Persistent Identifier Prefix"
required: true
schema:
type: string
Suffix:
name: suffix
in: path
description: "Persistent Identifier Suffix"
required: true
schema:
type: string
......@@ -3,7 +3,7 @@
<parent>
<groupId>com.indiscale.fdo</groupId>
<artifactId>fdo-manager-service</artifactId>
<version>0.1.0-rc1</version>
<version>0.1.0-rc2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -11,7 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<sourceDir>${project.basedir}/src/main</sourceDir>
<fdo.sdk.version>0.1.0-rc2</fdo.sdk.version>
<fdo.sdk.version>0.1.0-rc3</fdo.sdk.version>
</properties>
<artifactId>fdo-manager-service.application</artifactId>
<dependencies>
......
......@@ -107,6 +107,16 @@ public class MockRepositoryFactory implements RepositoryConnectionFactory {
public String get(String key) {
return null;
}
@Override
public String getDescription() {
return "This is not real.";
}
@Override
public String getMaintainer() {
return "Mocking Institute of Technology";
}
}
public static final RepositoryType TYPE =
......
......@@ -10,6 +10,7 @@ import com.indiscale.fdo.manager.service.BaseController;
import com.indiscale.fdo.manager.service.api.model.GetRepository200Response;
import com.indiscale.fdo.manager.service.api.model.Links;
import com.indiscale.fdo.manager.service.api.model.ListRepositories200Response;
import com.indiscale.fdo.manager.service.api.model.RepositoryAttributes;
import com.indiscale.fdo.manager.service.api.operation.RepositoriesApi;
import java.util.LinkedList;
import java.util.List;
......@@ -30,6 +31,10 @@ public class RepositoriesImpl extends BaseController implements RepositoriesApi
public Repository(RepositoryConfig config) {
this.setId(config.getId());
RepositoryAttributes attr = new RepositoryAttributes();
attr.setDescription(config.getDescription());
attr.setMaintainer(config.getMaintainer());
this.setAttributes(attr);
}
String getSelfRel() {
......
......@@ -9,7 +9,7 @@
<groupId>com.indiscale.fdo</groupId>
<artifactId>fdo-manager-service</artifactId>
<packaging>pom</packaging>
<version>0.1.0-rc1</version>
<version>0.1.0-rc2</version>
<modules>
<module>api</module>
<module>application</module>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment