From 650d3592a797f9742d3d325dcb0d78ab651f0d6b Mon Sep 17 00:00:00 2001 From: Rene Meier Date: Mon, 22 Jan 2024 15:43:24 +0100 Subject: [PATCH] Start similarity plugin api --- api-similarity-plugin/openapi.yaml | 30 +++++++++++++++++++++ api-similarity-plugin/schemas/peaklist.yaml | 12 +++++++++ 2 files changed, 42 insertions(+) create mode 100644 api-similarity-plugin/openapi.yaml create mode 100644 api-similarity-plugin/schemas/peaklist.yaml diff --git a/api-similarity-plugin/openapi.yaml b/api-similarity-plugin/openapi.yaml new file mode 100644 index 0000000..625659f --- /dev/null +++ b/api-similarity-plugin/openapi.yaml @@ -0,0 +1,30 @@ +openapi: 3.0.3 +info: + title: MassBank3 spectral similarity API + description: An API to calculate the spectral similarity between a query spectrum and some reference spectra + version: 0.0.1 +servers: + - url: 'https' +paths: + /version: + get: + summary: Get the version string of the implementation. + responses: + "200": + description: version string + content: + application/json: + schema: + type: string + /similarity: + summary: Calculates the spectral similarity between the query peaklist and the spectra in reflist. + post: + summary: Create a new similarity calculation + requestBody: + description: a similarity job + required: true + content: + application/json: + schema: + $ref: "./schemas/peaklist.yaml" + diff --git a/api-similarity-plugin/schemas/peaklist.yaml b/api-similarity-plugin/schemas/peaklist.yaml new file mode 100644 index 0000000..55c694e --- /dev/null +++ b/api-similarity-plugin/schemas/peaklist.yaml @@ -0,0 +1,12 @@ +type: object +properties: + mz: + description: mz values + type: array + items: + type: number + intensity: + description: intensity values + type: array + items: + type: number \ No newline at end of file