Skip to content

Commit

Permalink
Move paramaters to individual endpoints
Browse files Browse the repository at this point in the history
For certain swagger/openapi ui's
you need to define the input params on each endpoint.

Ref datacite/datacite/#862
  • Loading branch information
richardhallett committed Nov 14, 2019
1 parent 984c3c8 commit 6d6a152
Showing 1 changed file with 89 additions and 19 deletions.
108 changes: 89 additions & 19 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ paths:
schema:
$ref: '#/components/schemas/Activity'
'/activities/{id}':
parameters:
- name: id
in: path
description: Activity ID
required: true
schema:
type: string
get:
parameters:
- name: id
in: path
description: Activity ID
required: true
schema:
type: string
tags:
- activities
summary: Get a JSON API result of a specific activity
Expand Down Expand Up @@ -250,14 +250,14 @@ paths:
'200':
description: A JSON array of clients stats.
'/clients/{id}':
parameters:
get:
parameters:
- name: id
in: path
description: Client ID
required: true
schema:
type: string
get:
tags:
- clients
summary: Returns a client.
Expand All @@ -270,6 +270,13 @@ paths:
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.
Expand All @@ -283,6 +290,13 @@ paths:
'200':
description: OK
delete:
parameters:
- name: id
in: path
description: Client ID
required: true
schema:
type: string
tags:
- clients
summary: Delete a client.
Expand Down Expand Up @@ -400,14 +414,14 @@ paths:
'201':
description: Created
'/dois/{id}':
parameters:
get:
parameters:
- name: id
in: path
description: DOI
required: true
schema:
type: string
get:
tags:
- dois
summary: Returns a doi.
Expand All @@ -420,6 +434,13 @@ paths:
schema:
$ref: '#/components/schemas/Doi'
put:
parameters:
- name: id
in: path
description: DOI
required: true
schema:
type: string
tags:
- dois
summary: Update a doi.
Expand All @@ -433,21 +454,28 @@ paths:
'200':
description: OK
delete:
parameters:
- name: id
in: path
description: DOI
required: true
schema:
type: string
tags:
- dois
summary: Delete a doi.
responses:
'204':
description: No content
'/dois/{id}/activities':
parameters:
get:
parameters:
- name: id
in: path
description: DOI
required: true
schema:
type: string
get:
tags:
- dois
- activities
Expand Down Expand Up @@ -573,14 +601,14 @@ paths:
'201':
description: Created
'/events/{id}':
parameters:
get:
parameters:
- name: id
in: path
description: Event
required: true
schema:
type: string
get:
tags:
- events
summary: Returns an event.
Expand All @@ -593,6 +621,13 @@ paths:
schema:
$ref: '#/components/schemas/Event'
put:
parameters:
- name: id
in: path
description: Event
required: true
schema:
type: string
tags:
- events
summary: Update an event.
Expand All @@ -606,6 +641,13 @@ paths:
'200':
description: OK
delete:
parameters:
- name: id
in: path
description: Event
required: true
schema:
type: string
tags:
- events
summary: Delete an event.
Expand Down Expand Up @@ -795,14 +837,14 @@ paths:
'200':
description: A JSON array of providers stats.
'/providers/{id}':
parameters:
get:
parameters:
- name: id
in: path
description: DOI
required: true
schema:
type: string
get:
tags:
- providers
summary: A provider.
Expand All @@ -814,6 +856,13 @@ paths:
schema:
$ref: '#/components/schemas/Provider'
put:
parameters:
- name: id
in: path
description: DOI
required: true
schema:
type: string
tags:
- providers
summary: Update a provider.
Expand All @@ -827,6 +876,13 @@ paths:
'200':
description: OK
delete:
parameters:
- name: id
in: path
description: DOI
required: true
schema:
type: string
tags:
- providers
summary: Delete a provider.
Expand Down Expand Up @@ -906,14 +962,14 @@ paths:
'201':
description: Created
'/reports/{id}':
parameters:
get:
parameters:
- name: id
in: path
description: Report
required: true
schema:
type: string
get:
tags:
- reports
summary: A report.
Expand All @@ -925,6 +981,13 @@ paths:
schema:
$ref: '#/components/schemas/Report'
put:
parameters:
- name: id
in: path
description: Report
required: true
schema:
type: string
tags:
- reports
summary: Update a report.
Expand All @@ -938,6 +1001,13 @@ paths:
'200':
description: OK
delete:
parameters:
- name: id
in: path
description: Report
required: true
schema:
type: string
tags:
- reports
summary: Delete a report.
Expand Down

0 comments on commit 6d6a152

Please sign in to comment.