commit 054003c63f76cbd018e64c33c192b1ebfa434066 parent 9d074189eb0142475ce2beefb0f3ad7888842b4a Author: MTRNord <mtrnord1@gmail.com> Date: Sun, 18 Feb 2018 18:46:54 +0100 Replace swagger.yaml with openapi.yaml Diffstat:
| A | api/openapi.yaml | | | 63 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| D | api/swagger.yaml | | | 71 | ----------------------------------------------------------------------- |
2 files changed, 63 insertions(+), 71 deletions(-)
diff --git a/api/openapi.yaml b/api/openapi.yaml @@ -0,0 +1,62 @@ +openapi: 3.0.0 +info: + title: Social Networks News Project API + description: API Definition for the Social Networks News Project + version: 0.0.0 + +servers: + - url: https://socialnetworksnews.nordgedanken.blog/api + - url: https://freifunknews.nordgedanken.blog/api + +tags: + - name: "paper" + description: "Everything that is used for papers" + - name: "user" + description: "Get user Data" + +paths: + /paper/{uuid}/yesterday: + get: + tags: + - paper + summary: Get the Data that should get displayed of yesterday + parameters: + - name: uuid + in: path + description: UUID of the paper + required: true + schema: + type: "integer" + format: "int64" + responses: + '200': # status code + description: A JSON array of Posts (currently Tweets) + content: + application/json: + schema: + type: array + items: + properties: + username: + type: "string" + user_id: + type: "string" + display_name: + type: "string" + userprofile_link: + type: "string" + text: + type: "string" + image_urls: + type: "array" + items: + type: "string" + created_at: + type: "string" + favorites: + type: "string" + retweets: + type: "string" + retweet: + type: "boolean" + default: false +\ No newline at end of file diff --git a/api/swagger.yaml b/api/swagger.yaml @@ -1,70 +0,0 @@ -swagger: "2.0" -info: - description: "API Definition for the Social Networks News Project" - version: "0.0.0" - title: "Social Networks News Project API" - termsOfService: "TODO" - contact: - email: "freifunknews@nordgedanken.blog" - license: - name: "GPL-3.0" - url: "https://github.com/SocialNetworkNews/SocialNetworkNews_API/raw/master/LICENSE" -host: "socialnetworksnews.nordgedanken.blog" -basePath: "/api" -tags: -- name: "paper" - description: "Everything that is used for papers" -- name: "user" - description: "Get user Data" -schemes: -- "https" -paths: - /paper/{uuid}/yesterday: - get: - tags: - - "paper" - parameters: - - name: "uuid" - in: "path" - description: "UUID of the paper" - required: true - type: "integer" - format: "int64" - summary: "Get the Data that should get displayed of yesterday" - description: "" - operationId: "getYesterday" - produces: - - "application/json" - responses: - 200: - description: OK - schema: - $ref: '#/definitions/PaperData' -definitions: - PaperData: - type: "array" - items: - properties: - username: - type: "string" - user_id: - type: "string" - display_name: - type: "string" - userprofile_link: - type: "string" - text: - type: "string" - image_urls: - type: "array" - items: - type: "string" - created_at: - type: "string" - favorites: - type: "string" - retweets: - type: "string" - retweet: - type: "boolean" - default: false -\ No newline at end of file