Skip to content

Commit

Permalink
Merge pull request #36 from Onto-Med/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ChristophB authored Apr 6, 2022
2 parents ab5c245 + 44862cc commit fb5e4b8
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>care.smith.top</groupId>
<artifactId>top-api</artifactId>
<version>0.3.3</version>
<version>0.3.4</version>

<name>TOP API</name>
<description>REST API of the TOP framework</description>
Expand Down
55 changes: 48 additions & 7 deletions schemas/top-api.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: TOP API
version: 0.3.3
version: 0.3.4
description: API to manage phenotypes, repositories, ontologies and organisations

servers:
Expand Down Expand Up @@ -65,6 +65,23 @@ paths:
default:
$ref: "#/components/responses/UnexpectedError"

/statistic:
summary: Get statistics about available content. Returned data may be cached.
get:
operationId: getStatistics
security:
- BearerAuth: []
- BasicAuth: []
responses:
200:
description: Object holding statistics
content:
application/json:
schema:
$ref: "#/components/schemas/Statistic"
default:
$ref: "#/components/responses/UnexpectedError"

/user_account:
parameters:
- $ref: "#/components/parameters/include"
Expand Down Expand Up @@ -972,11 +989,6 @@ paths:
required: true
schema:
type: string
- name: version
description: Defaults to the latest version number.
in: query
schema:
$ref: "#/components/schemas/VersionNumber"
- $ref: "#/components/parameters/include"
get:
summary: Returns all forks of a particular entity.
Expand All @@ -1003,6 +1015,12 @@ paths:
operationId: createFork
tags:
- fork
parameters:
- name: version
description: Defaults to the latest version number.
in: query
schema:
$ref: "#/components/schemas/VersionNumber"
requestBody:
description: Fork instructions like destination
required: true
Expand All @@ -1011,7 +1029,7 @@ paths:
schema:
$ref: "#/components/schemas/ForkCreateInstruction"
responses:
200:
201:
description: List of affected entities (i.e., entities created in the destination repository).
content:
application/json:
Expand Down Expand Up @@ -1759,6 +1777,29 @@ components:
type: string
readOnly: true

Statistic:
description:
Holds statistics about content. The scope may be a subset of content stored on the server.
Statistics may vary depending on user permissions.
type: object
properties:
organisations:
description: Number of organisations
type: integer
format: int32
repositories:
description: Number of repositories
type: integer
format: int32
categories:
description: Number of phenotype categories
type: integer
format: int32
phenotypes:
description: Number of phenotypes
type: integer
format: int32

securitySchemes:
BearerAuth:
type: http
Expand Down

0 comments on commit fb5e4b8

Please sign in to comment.