-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Cybersecurity-LINKS/docs-mediterraneus
Update main
- Loading branch information
Showing
12 changed files
with
14,362 additions
and
4,698 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
openapi: '3.0.1' | ||
info: | ||
version: '1.0.0' | ||
title: 'Connector API' | ||
description: This document specifies the REST API for the Connector service. | ||
externalDocs: | ||
description: Github | ||
url: https://github.com/Cybersecurity-LINKS/mediterraneus-client-side | ||
servers: | ||
- url: http://localhost:1234 | ||
tags: | ||
- name: Identities | ||
description: Everything about user identities. | ||
- name: Assets | ||
description: Everything about user assets. | ||
paths: | ||
# Identities APIs | ||
/identities: | ||
post: | ||
summary: Creates a user identity. | ||
tags: | ||
- Identities | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/IdentityRequest' | ||
responses: | ||
'201': | ||
description: Created | ||
/identities/{ethAddress}: | ||
parameters: | ||
- name: ethAddress | ||
description: The unique identifier of the spacecraft | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/ethAddress' | ||
get: | ||
summary: Read a spacecraft | ||
tags: | ||
- Identities | ||
responses: | ||
200: | ||
description: The spacecraft corresponding to the provided `ethAddress` | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Spacecraft' | ||
404: | ||
description: No spacecraft found for the provided `ethAddress` | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
500: | ||
description: Unexpected error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
/identities/{ethAddress}/sign-data: | ||
parameters: | ||
- name: ethAddress | ||
description: The unique identifier of the spacecraft | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/ethAddress' | ||
post: | ||
summary: Creates a user identity. | ||
tags: | ||
- Identities | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/IdentityRequest' | ||
responses: | ||
'201': | ||
description: Created | ||
/identities/{ethAddress}/gen-presentation: | ||
parameters: | ||
- name: ethAddress | ||
description: The unique identifier of the spacecraft | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/ethAddress' | ||
post: | ||
summary: Creates a user identity. | ||
tags: | ||
- Identities | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/IdentityRequest' | ||
responses: | ||
'201': | ||
description: Created | ||
# Assets APIs | ||
/assets: | ||
post: | ||
summary: Upload an asset of the user | ||
tags: | ||
- Assets | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/IdentityRequest' | ||
responses: | ||
'201': | ||
description: Created | ||
get: | ||
summary: Upload an asset of the user | ||
tags: | ||
- Assets | ||
responses: | ||
'201': | ||
description: Created | ||
/assets/{assetId}: | ||
parameters: | ||
- name: assetId | ||
description: The unique identifier of the asset | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/assetId' | ||
get: | ||
summary: Upload an asset of the user | ||
tags: | ||
- Assets | ||
responses: | ||
'201': | ||
description: Created | ||
patch: | ||
summary: Upload an asset of the user | ||
tags: | ||
- Assets | ||
responses: | ||
'201': | ||
description: Created | ||
/assets/{assetId}/challenge: | ||
parameters: | ||
- name: assetId | ||
description: The unique identifier of the asset | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/assetId' | ||
get: | ||
summary: Upload an asset of the user | ||
tags: | ||
- Assets | ||
responses: | ||
'201': | ||
description: Created | ||
/assets/{assetId}/download: | ||
parameters: | ||
- name: assetId | ||
description: The unique identifier of the asset | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/assetId' | ||
post: | ||
summary: Upload an asset of the user | ||
tags: | ||
- Assets | ||
responses: | ||
'201': | ||
description: Created | ||
components: | ||
schemas: | ||
ethAddress: | ||
description: The unique identifier of a spacecraft | ||
type: string | ||
assetId: | ||
description: The unique identifier of an asset | ||
type: string | ||
Spacecraft: | ||
type: object | ||
required: | ||
- id | ||
- name | ||
- type | ||
properties: | ||
id: | ||
$ref: '#/components/schemas/ethAddress' | ||
name: | ||
type: string | ||
type: | ||
type: string | ||
enum: | ||
- capsule | ||
- probe | ||
- satellite | ||
- spaceplane | ||
- station | ||
description: | ||
type: string | ||
IdentityRequest: | ||
type: object | ||
Error: | ||
type: object | ||
required: | ||
- message | ||
properties: | ||
message: | ||
description: A human readable error message | ||
type: string | ||
securitySchemes: | ||
ApiKey: | ||
type: apiKey | ||
in: header | ||
name: X-Api-Key | ||
security: | ||
- ApiKey: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
openapi: '3.0.0' | ||
info: | ||
version: '1.0.0' | ||
title: 'Issuer API' | ||
description: This document specifies the REST API for the Issuer service. | ||
externalDocs: | ||
description: Github | ||
url: https://github.com/Cybersecurity-LINKS/mediterraneus-issuer-rs | ||
servers: | ||
- url: http://localhost:3213/api | ||
tags: | ||
- name: Credentials | ||
description: Everything about Verifiable Credentials. | ||
paths: | ||
/challenges: | ||
get: | ||
summary: Get a challenge that the client should sign and send back in a short time. | ||
parameters: | ||
- in: query | ||
name: did | ||
description: The did of the user who have to sign the challenge. | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/did' | ||
responses: | ||
200: | ||
description: The challenge to be signed. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Challenge' | ||
429: | ||
description: Too Many Requests | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
500: | ||
description: Unexpected error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
/credentials: | ||
post: | ||
summary: Get a challenge that the client should sign and send back in a short time. | ||
parameters: | ||
- in: query | ||
name: did | ||
description: The did of the user who have to sign the challenge. | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/did' | ||
responses: | ||
'200': | ||
description: The spacecraft corresponding to the provided `spacecraftId` | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Spacecraft' | ||
404: | ||
description: No spacecraft found for the provided `spacecraftId` | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
500: | ||
description: Unexpected error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
components: | ||
schemas: | ||
did: | ||
description: The unique identifier of a spacecraft | ||
type: string | ||
Challenge: | ||
description: The unique identifier of a spacecraft | ||
type: string | ||
SpacecraftId: | ||
description: The unique identifier of a spacecraft | ||
type: string | ||
Spacecraft: | ||
type: object | ||
required: | ||
- id | ||
- name | ||
- type | ||
properties: | ||
id: | ||
$ref: '#/components/schemas/SpacecraftId' | ||
name: | ||
type: string | ||
type: | ||
type: string | ||
enum: | ||
- capsule | ||
- probe | ||
- satellite | ||
- spaceplane | ||
- station | ||
description: | ||
type: string | ||
Error: | ||
type: object | ||
required: | ||
- message | ||
properties: | ||
message: | ||
description: A human readable error message | ||
type: string | ||
# securitySchemes: | ||
# ApiKey: | ||
# type: apiKey | ||
# in: header | ||
# name: X-Api-Key | ||
# security: | ||
# - ApiKey: [] |
Oops, something went wrong.