-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MA-96] describe getActionAgendaById API #2
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,78 @@ | ||||||||||||||
openapi: 3.0.1 | ||||||||||||||
info: | ||||||||||||||
title: Strategy Module | ||||||||||||||
description: This is the Strategy Module of AEGEE-Europe | ||||||||||||||
license: | ||||||||||||||
name: Apache 2.0 | ||||||||||||||
url: http://www.apache.org/licenses/LICENSE-2.0.html | ||||||||||||||
version: 0.0.1 | ||||||||||||||
paths: | ||||||||||||||
/actionagenda/{aaId}: | ||||||||||||||
get: | ||||||||||||||
tags: | ||||||||||||||
- Action Agenda | ||||||||||||||
summary: Display a specified Action Agenda | ||||||||||||||
description: For valid response try integer IDs with value >= 1 and <= 10. Other | ||||||||||||||
values will generated exceptions | ||||||||||||||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
? |
||||||||||||||
operationId: getActionAgendaById | ||||||||||||||
parameters: | ||||||||||||||
- name: aaId | ||||||||||||||
in: path | ||||||||||||||
description: ID of Action Agenda that needs to be fetched | ||||||||||||||
required: true | ||||||||||||||
schema: | ||||||||||||||
type: string | ||||||||||||||
responses: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would add a response of 401 here, saying that the user is unauthorized to do view the Action Agenda |
||||||||||||||
200: | ||||||||||||||
description: Get specified Action Agenda | ||||||||||||||
content: | ||||||||||||||
application/json: | ||||||||||||||
schema: | ||||||||||||||
$ref: '#/components/schemas/ActionAgenda' | ||||||||||||||
400: | ||||||||||||||
description: Invalid Action Agenda ID supplied | ||||||||||||||
content: {} | ||||||||||||||
404: | ||||||||||||||
description: Action Agenda not found | ||||||||||||||
content: {} | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This fixes the 401 request by Rik. I don't think we need to specify here the meaning of 401, because the whole API is only accessible with authN |
||||||||||||||
components: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I like line breaks |
||||||||||||||
schemas: | ||||||||||||||
ActionAgenda: | ||||||||||||||
WikiRik marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
type: array | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When we return an ActionAgenda, we must also return its ID, because that's the only way we can manipulate this object. |
||||||||||||||
items: | ||||||||||||||
$ref: '#/components/schemas/FocusArea' | ||||||||||||||
FocusArea: | ||||||||||||||
WikiRik marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: object | ||||||||||||||
properties: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
name: | ||||||||||||||
type: string | ||||||||||||||
example: 'Climate Emergency' | ||||||||||||||
actions: | ||||||||||||||
type: array | ||||||||||||||
items: | ||||||||||||||
$ref: '#/components/schemas/Action' | ||||||||||||||
Action: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: object | ||||||||||||||
properties: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
title: | ||||||||||||||
type: string | ||||||||||||||
example: "Action Title" | ||||||||||||||
description: | ||||||||||||||
type: string | ||||||||||||||
example: "Action Description" | ||||||||||||||
indicators: | ||||||||||||||
type: array | ||||||||||||||
items: | ||||||||||||||
$ref: "#/components/schemas/Indicator" | ||||||||||||||
Indicator: | ||||||||||||||
WikiRik marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: object | ||||||||||||||
properties: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
name: | ||||||||||||||
type: string | ||||||||||||||
example: "Indicator Name" | ||||||||||||||
minimum: | ||||||||||||||
WikiRik marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
type: integer | ||||||||||||||
example: 1 | ||||||||||||||
maximum: | ||||||||||||||
type: integer | ||||||||||||||
example: 5 | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
empty line at the end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand this. If the ID is between 1 and 10 it will give an Action Agenda and otherwise it will generate an exception? Won't it generate 404 errors for every non-existing Action Agenda?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a leftover of the base we used. This is only in the description here and not an actual limitation of the values but indeed this needs to change. Thanks for noticing it!