From f6fd4c6e2bcf9e27a916b2b63604682fd03bf4b6 Mon Sep 17 00:00:00 2001 From: Kelly Stathis Date: Mon, 8 Aug 2022 10:24:46 -0700 Subject: [PATCH 1/8] add missing params for provider-prefixes --- openapi.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 0214f0f70..736a3d21e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -913,6 +913,40 @@ paths: tags: - provider-prefixes summary: A JSON array of provider-prefixes. + parameters: + - in: query + name: query + schema: + type: string + - in: query + name: year + schema: + type: integer + - in: query + name: consortium-id + schema: + type: string + - in: query + name: provider-id + schema: + type: string + - in: query + name: prefix-id + schema: + type: string + - in: query + name: page[number] + schema: + type: integer + - in: query + name: sort + schema: + type: string + enum: + - name + - '-name' + - created + - '-created' responses: '200': description: A JSON array of provider-prefixes. From 088b659d58276d3f076f48fc58514c1bcb7670b2 Mon Sep 17 00:00:00 2001 From: Kelly Stathis Date: Mon, 8 Aug 2022 10:25:22 -0700 Subject: [PATCH 2/8] remove post /providers and /clients --- openapi.yaml | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 736a3d21e..cbb9b54f3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -254,22 +254,6 @@ paths: application/vnd.api+json: schema: $ref: '#/components/schemas/Client' - post: - tags: - - clients - summary: Add a new client. - security: - - BasicAuth: [] - - bearerAuth: [] - requestBody: - required: true - content: - application/vnd.api+json: - schema: - $ref: '#/components/schemas/Client' - responses: - '201': - description: Created /clients/totals: get: tags: @@ -1052,22 +1036,6 @@ paths: application/vnd.api+json: schema: $ref: '#/components/schemas/Provider' - post: - tags: - - providers - summary: Add a new provider. - security: - - BasicAuth: [] - - bearerAuth: [] - requestBody: - required: true - content: - application/vnd.api+json: - schema: - $ref: '#/components/schemas/Provider' - responses: - '201': - description: Created /providers/totals: get: tags: From b7b71cead39a3615206e33437f6e84963b14bd0a Mon Sep 17 00:00:00 2001 From: Kelly Stathis Date: Mon, 8 Aug 2022 10:26:06 -0700 Subject: [PATCH 3/8] allow optional security (default option) when retrieving DOIs, clients, and providers --- openapi.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index cbb9b54f3..46fde9c9a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -157,7 +157,6 @@ paths: tags: - clients summary: Returns a list of clients (repositories). - security: [] parameters: - in: query name: query @@ -339,7 +338,6 @@ paths: tags: - dois summary: Return a list of dois. - security: [] parameters: - in: query name: query @@ -558,7 +556,6 @@ paths: tags: - dois summary: Returns a doi. - security: [] responses: '200': description: A JSON object. @@ -619,7 +616,6 @@ paths: - dois - activities summary: Returns activity for a specific DOI - security: [] responses: '200': description: A JSON object. @@ -943,7 +939,6 @@ paths: tags: - providers summary: Returns a list of providers (including members and consortium organizations). - security: [] parameters: - in: query name: query From b473203dbe29628696108d594602b56d1eb8b51d Mon Sep 17 00:00:00 2001 From: Kelly Stathis Date: Mon, 8 Aug 2022 10:38:18 -0700 Subject: [PATCH 4/8] standardize summary language --- openapi.yaml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 46fde9c9a..8e6aa0ba0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -102,7 +102,7 @@ paths: type: string tags: - activities - summary: Get a JSON API result of a specific activity + summary: Get a JSON API result of a specific activity. responses: '200': description: A JSON object. @@ -114,7 +114,7 @@ paths: get: tags: - client-prefixes - summary: Returns a list of client-prefixes. + summary: Return a list of client-prefixes. parameters: - in: query name: query @@ -156,7 +156,7 @@ paths: get: tags: - clients - summary: Returns a list of clients (repositories). + summary: Return a list of clients (repositories). parameters: - in: query name: query @@ -257,7 +257,7 @@ paths: get: tags: - clients - summary: Returns Clients DOI production statistics. + summary: Return clients DOI production statistics. parameters: - in: query name: provider-id @@ -285,7 +285,7 @@ paths: type: string tags: - clients - summary: Returns a client. + summary: Return a client. responses: '200': description: A JSON object. @@ -555,7 +555,7 @@ paths: type: string tags: - dois - summary: Returns a doi. + summary: Return a doi. responses: '200': description: A JSON object. @@ -615,7 +615,7 @@ paths: tags: - dois - activities - summary: Returns activity for a specific DOI + summary: Return activity for a specific DOI. responses: '200': description: A JSON object. @@ -625,7 +625,7 @@ paths: $ref: '#/components/schemas/Activity' /events: get: - summary: Returns a list of events. + summary: Return a list of events. security: [] parameters: - in: query @@ -751,7 +751,7 @@ paths: type: string tags: - events - summary: Returns an event. + summary: Return an event. security: [] responses: '200': @@ -804,7 +804,7 @@ paths: get: tags: - heartbeat - summary: This resource returns the current status of the REST API. + summary: Return the current status of the REST API. security: [] responses: '200': @@ -825,7 +825,7 @@ paths: get: tags: - prefixes - summary: Returns a list of prefixes. + summary: Return a list of prefixes. security: [] parameters: - in: query @@ -851,7 +851,7 @@ paths: get: tags: - prefixes - summary: Returns prefixes DOI production statistics. + summary: Return prefixes DOI production statistics. parameters: - in: query name: client-id @@ -872,7 +872,7 @@ paths: get: tags: - prefixes - summary: A prefix. + summary: Return a prefix. security: [] parameters: - name: id @@ -883,7 +883,7 @@ paths: type: string responses: '200': - description: Returns a prefix. + description: Return a prefix. content: application/vnd.api+json: schema: @@ -892,7 +892,7 @@ paths: get: tags: - provider-prefixes - summary: A JSON array of provider-prefixes. + summary: Return a list of provider-prefixes. parameters: - in: query name: query @@ -938,7 +938,7 @@ paths: get: tags: - providers - summary: Returns a list of providers (including members and consortium organizations). + summary: Return a list of providers (including members and consortium organizations). parameters: - in: query name: query @@ -1035,7 +1035,7 @@ paths: get: tags: - providers - summary: Returns Providers DOI production statistics. + summary: Return providers DOI production statistics. parameters: - in: query name: state @@ -1059,7 +1059,7 @@ paths: type: string tags: - providers - summary: A provider. + summary: Return a provider. responses: '200': description: A JSON object. @@ -1195,7 +1195,7 @@ paths: type: string tags: - reports - summary: A report. + summary: Return a report. responses: '200': description: A JSON object. From 52c1cc02662bb84a1c03405a0530004cb77eaaa7 Mon Sep 17 00:00:00 2001 From: Kelly Stathis Date: Mon, 8 Aug 2022 10:42:36 -0700 Subject: [PATCH 5/8] fix POST /dois example --- openapi.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 8e6aa0ba0..fc5e2a7f3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1815,8 +1815,8 @@ components: type: dois attributes: doi: 10.5438/0014 - prefix: 10.5438 - suffix: 0014 + prefix: "10.5438" + suffix: "0014" identifiers: - identifier: 'https://doi.org/10.5438/0014' identifierType: DOI @@ -1829,7 +1829,7 @@ components: publisher: DataCite publicationYear: 2017 types: - - resourceTypeGeneral: Text + resourceTypeGeneral: Text url: https://schema.datacite.org/meta/kernel-4.1/ Event: type: object From ea2e0b5c73985d54d05dd5e58228db348fea767b Mon Sep 17 00:00:00 2001 From: Kelly Stathis Date: Mon, 8 Aug 2022 10:48:43 -0700 Subject: [PATCH 6/8] add description to DOI "state" parameter; fix capitalization --- openapi.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index fc5e2a7f3..706d3f9fe 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -213,7 +213,7 @@ paths: type: string enum: - CLARIN - - CoreTrustSEal + - CoreTrustSeal - DIN 31644 - DINI - DSA @@ -377,7 +377,7 @@ paths: type: string enum: - CLARIN - - CoreTrustSEal + - CoreTrustSeal - DIN 31644 - DINI - DSA @@ -859,6 +859,7 @@ paths: type: string - in: query name: state + description: Must be authenticated to view registered and draft DOIs. schema: type: string enum: From e85a6fa5dc34f7eb70b233379d83612b3d851feb Mon Sep 17 00:00:00 2001 From: Kelly Stathis Date: Mon, 8 Aug 2022 11:01:05 -0700 Subject: [PATCH 7/8] remove put and delete for /providers and clients --- openapi.yaml | 80 ---------------------------------------------------- 1 file changed, 80 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 706d3f9fe..51c9b0733 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -293,46 +293,6 @@ paths: application/vnd.api+json: schema: $ref: '#/components/schemas/Client' - put: - parameters: - - name: id - in: path - description: Client ID - required: true - schema: - type: string - tags: - - clients - summary: Update a client. - security: - - BasicAuth: [] - - bearerAuth: [] - requestBody: - required: true - content: - application/vnd.api+json: - schema: - $ref: '#/components/schemas/Client' - responses: - '200': - description: OK - delete: - parameters: - - name: id - in: path - description: Client ID - required: true - schema: - type: string - tags: - - clients - summary: Delete a client. - security: - - BasicAuth: [] - - bearerAuth: [] - responses: - '204': - description: No content /dois: get: tags: @@ -1068,46 +1028,6 @@ paths: application/vnd.api+json: schema: $ref: '#/components/schemas/Provider' - put: - parameters: - - name: id - in: path - description: Provider ID - required: true - schema: - type: string - tags: - - providers - summary: Update a provider. - security: - - BasicAuth: [] - - bearerAuth: [] - requestBody: - required: true - content: - application/vnd.api+json: - schema: - $ref: '#/components/schemas/Provider' - responses: - '200': - description: OK - delete: - parameters: - - name: id - in: path - description: Provider ID - required: true - schema: - type: string - tags: - - providers - summary: Delete a provider. - security: - - BasicAuth: [] - - bearerAuth: [] - responses: - '204': - description: No content /reports: get: tags: From ed50f4b9ca4ec66d9d593919b88a73ca06eca2f6 Mon Sep 17 00:00:00 2001 From: Kelly Stathis Date: Mon, 8 Aug 2022 11:36:08 -0700 Subject: [PATCH 8/8] remove post/put/delete events --- openapi.yaml | 56 ---------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 51c9b0733..691d67f5f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -684,22 +684,6 @@ paths: $ref: '#/components/schemas/Event' tags: - events - post: - tags: - - events - summary: Add a new event. - security: - - BasicAuth: [] - - bearerAuth: [] - requestBody: - required: true - content: - application/vnd.api+json: - schema: - $ref: '#/components/schemas/Event' - responses: - '201': - description: Created '/events/{id}': get: parameters: @@ -720,46 +704,6 @@ paths: application/vnd.api+json: schema: $ref: '#/components/schemas/Event' - put: - parameters: - - name: id - in: path - description: Event - required: true - schema: - type: string - tags: - - events - summary: Update an event. - security: - - BasicAuth: [] - - bearerAuth: [] - requestBody: - required: true - content: - application/vnd.api+json: - schema: - $ref: '#/components/schemas/Event' - responses: - '200': - description: OK - delete: - parameters: - - name: id - in: path - description: Event - required: true - schema: - type: string - tags: - - events - summary: Delete an event. - security: - - BasicAuth: [] - - bearerAuth: [] - responses: - '204': - description: No content /heartbeat: get: tags: