Skip to content

Commit

Permalink
Merge pull request #256 from CSCfi/feature/templates-api
Browse files Browse the repository at this point in the history
Feature/templates api
  • Loading branch information
blankdots authored Oct 5, 2021
2 parents 32adc5e + 9b126b2 commit 3eb1f9a
Show file tree
Hide file tree
Showing 21 changed files with 635 additions and 135 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM python:3.8-alpine3.13 as BUILD-BACKEND

RUN apk add --update \
&& apk add --no-cache build-base curl-dev linux-headers bash git musl-dev libffi-dev \
&& apk add --no-cache python3-dev openssl-dev rust cargo \
&& apk add --no-cache python3-dev openssl-dev rust cargo libstdc++ \
&& rm -rf /var/cache/apk/*

COPY requirements.txt /root/submitter/requirements.txt
Expand All @@ -34,7 +34,7 @@ RUN pip install --upgrade pip && \

FROM python:3.8-alpine3.13

RUN apk add --no-cache --update bash
RUN apk add --no-cache --update libstdc++

LABEL maintainer="CSC Developers"
LABEL org.label-schema.schema-version="1.0"
Expand Down
132 changes: 130 additions & 2 deletions docs/specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ paths:
parameters:
- name: schema
in: path
description: Title of the XML schema.
description: Name of the Metadata schema.
schema:
type: string
required: true
Expand Down Expand Up @@ -529,7 +529,7 @@ paths:
parameters:
- name: schema
in: path
description: Title of the XML schema.
description: Name of the Metadata schema.
schema:
type: string
required: true
Expand Down Expand Up @@ -749,6 +749,134 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/403Forbidden"
/templates/{schema}:
post:
tags:
- Submission
summary: Submit data to a specific schema
parameters:
- name: schema
in: path
description: Title of the template schema.
schema:
type: string
required: true
requestBody:
content:
application/json:
schema:
type: object
responses:
201:
description: Created
content:
application/json:
schema:
$ref: "#/components/schemas/ObjectCreated"
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/400BadRequest"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/401Unauthorized"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/403Forbidden"
/templates/{schema}/{accessionId}:
get:
tags:
- Query
summary: List of object by accession ID.
parameters:
- name: schema
in: path
description: Unique id of the targeted service.
schema:
type: string
required: true
- name: accessionId
in: path
description: filter objects in schema using accession ID
schema:
type: string
required: true
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Object"
text/xml:
schema:
type: string
format: binary
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/401Unauthorized"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/403Forbidden"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/404NotFound"
delete:
tags:
- Manage
summary: Delete object from a schema with a specified accession ID
parameters:
- name: schema
in: path
description: Unique id of the targeted service.
schema:
type: string
required: true
- name: accessionId
in: path
description: filter objects in schema using accession ID
schema:
type: string
required: true
responses:
204:
description: No Content
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/400BadRequest"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/401Unauthorized"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/403Forbidden"

/folders:
get:
tags:
Expand Down
Loading

0 comments on commit 3eb1f9a

Please sign in to comment.