Skip to content
Snippets Groups Projects

Post3.0

Merged Eloi Juszczak requested to merge post3.0 into master
5 files
+ 153
141
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 106
105
openapi: 3.0.0
info:
title: Swagger Petstore
description: "This is a sample Petstore server. You can find \nout more about Swagger\
description:
"This is a sample Petstore server. You can find \nout more about Swagger\
\ at \n[http://swagger.io](http://swagger.io) or on \n[irc.freenode.net, #swagger](http://swagger.io/irc/).\n"
termsOfService: http://swagger.io/terms/
contact:
@@ -14,28 +15,28 @@ externalDocs:
description: Find out more about Swagger
url: http://swagger.io
servers:
- url: https://virtserver.swaggerhub.com/Sr05-Project/Distributed_Facebook_API/1.0.0
description: SwaggerHub API Auto Mocking
- url: https://virtserver.swaggerhub.com/Sr05-Project/Receive/1.0.0
- url: http://virtserver.swaggerhub.com/Sr05-Project/Receive/1.0.0
- url: https://virtserver.swaggerhub.com/Sr05-Project/Distributed_Facebook_API/1.0.0
description: SwaggerHub API Auto Mocking
- url: https://virtserver.swaggerhub.com/Sr05-Project/Receive/1.0.0
- url: http://virtserver.swaggerhub.com/Sr05-Project/Receive/1.0.0
tags:
- name: communication
description: communication request
externalDocs:
description: Find out more
url: http://swagger.io
- name: friends
description: Access to friend's friends
- name: posts
description: Operations about posts
externalDocs:
description: Find out more about our posts lul
url: http://swagger.io
- name: communication
description: communication request
externalDocs:
description: Find out more
url: http://swagger.io
- name: friends
description: Access to friend's friends
- name: posts
description: Operations about posts
externalDocs:
description: Find out more about our posts lul
url: http://swagger.io
paths:
/init:
get:
tags:
- Local
- Local
summary: Target by the local react on start
description: Ask if friends are available and ask for the snapshot
operationId: init
@@ -46,11 +47,11 @@ paths:
/communicate:
post:
tags:
- communication
- communication
summary: Treat this message
operationId: receiveMessage
requestBody:
$ref: '#/components/requestBodies/Message'
$ref: "#/components/requestBodies/Message"
responses:
"405":
description: Invalid
@@ -58,7 +59,7 @@ paths:
/receiveMessage:
post:
tags:
- communication
- communication
summary: add a new message
operationId: receiveMessagePOST
responses:
@@ -71,7 +72,7 @@ paths:
/sendMessageFriend:
post:
tags:
- communication
- communication
summary: add a new message to your friend
operationId: sendMessagePOST
responses:
@@ -84,19 +85,19 @@ paths:
/privateMessages:
get:
tags:
- communication
- communication
summary: Getmessages from user
description: Get messages from receiving user
operationId: privateMessagesofUserGET
parameters:
- name: url
in: query
description: url of user
required: true
style: form
explode: true
schema:
type: string
- name: url
in: query
description: url of user
required: true
style: form
explode: true
schema:
type: string
responses:
"200":
description: successful operation
@@ -105,18 +106,18 @@ paths:
schema:
type: array
items:
$ref: '#/components/schemas/Message'
$ref: "#/components/schemas/Message"
x-content-type: application/json
application/xml:
schema:
type: array
items:
$ref: '#/components/schemas/Message'
$ref: "#/components/schemas/Message"
x-swagger-router-controller: Communication
/friends:
get:
tags:
- friends
- friends
summary: Get friends from receiving user
description: Get friends from receiving user
operationId: getAllFriends
@@ -128,31 +129,31 @@ paths:
schema:
type: array
items:
$ref: '#/components/schemas/Friends'
$ref: "#/components/schemas/Friends"
x-content-type: application/json
application/xml:
schema:
type: array
items:
$ref: '#/components/schemas/Friends'
$ref: "#/components/schemas/Friends"
x-swagger-router-controller: Friends
post:
tags:
- friends
- friends
summary: Add me as friend
operationId: addMe
parameters:
- name: situation
in: query
description: inner request or out request
required: true
style: form
explode: true
schema:
type: string
enum:
- out
- in
- name: situation
in: query
description: inner request or out request
required: true
style: form
explode: true
schema:
type: string
enum:
- out
- in
responses:
"200":
description: request has been made
@@ -167,30 +168,30 @@ paths:
/notify:
get:
tags:
- friends
- friends
summary: Notify the the targeted user than you are connected
description: Say that you are connected
operationId: notify
parameters:
- name: from
in: query
description: origin of the request
required: true
style: form
explode: true
schema:
type: integer
- name: action
in: query
description: type of notification
required: true
style: form
explode: true
schema:
type: string
enum:
- login
- logout
- name: from
in: query
description: origin of the request
required: true
style: form
explode: true
schema:
type: integer
- name: action
in: query
description: type of notification
required: true
style: form
explode: true
schema:
type: string
enum:
- login
- logout
responses:
"200":
description: returned if you are connected
@@ -198,19 +199,19 @@ paths:
/posts:
get:
tags:
- posts
- posts
summary: Get posts from friend
description: Get posts from friend
operationId: getAllPosts
parameters:
- name: status
in: query
description: Status values that need to be considered for filter
required: false
style: form
explode: true
schema:
$ref: '#/components/schemas/User'
- name: status
in: query
description: Status values that need to be considered for filter
required: false
style: form
explode: true
schema:
$ref: "#/components/schemas/User"
responses:
"200":
description: successful operation
@@ -219,21 +220,21 @@ paths:
schema:
type: array
items:
$ref: '#/components/schemas/Post'
$ref: "#/components/schemas/Post"
x-content-type: application/json
application/xml:
schema:
type: array
items:
$ref: '#/components/schemas/Post'
$ref: "#/components/schemas/Post"
x-swagger-router-controller: Posts
post:
tags:
- posts
- posts
summary: Create a new post
operationId: createNewPost
requestBody:
$ref: '#/components/requestBodies/CreateNewPost'
# requestBody:
# $ref: '#/components/requestBodies/CreateNewPost'
responses:
"200":
description: request has been made
@@ -250,27 +251,27 @@ components:
Friends:
type: array
items:
$ref: '#/components/schemas/User'
$ref: "#/components/schemas/User"
Message:
required:
- content
- messageType
- sender
- target
- content
- messageType
- sender
- target
type: object
properties:
id:
type: integer
format: int64
messageType:
$ref: '#/components/schemas/MessageType'
$ref: "#/components/schemas/MessageType"
content:
type: string
example: Salut
sender:
$ref: '#/components/schemas/User'
$ref: "#/components/schemas/User"
target:
$ref: '#/components/schemas/User'
$ref: "#/components/schemas/User"
example:
messageType: private
sender:
@@ -283,7 +284,7 @@ components:
name: Pet
CreateNewPost:
required:
- content
- content
type: object
properties:
content:
@@ -300,12 +301,12 @@ components:
MessageType:
type: string
enum:
- private
- broadcast
- private
- broadcast
User:
required:
- name
- url
- name
- url
type: object
properties:
id:
@@ -321,10 +322,10 @@ components:
url: url
Post:
required:
- author
- content
- date
- id
- author
- content
- date
- id
type: object
properties:
id:
@@ -335,7 +336,7 @@ components:
content:
type: string
author:
$ref: '#/components/schemas/User'
$ref: "#/components/schemas/User"
example:
date: date
author:
@@ -352,25 +353,25 @@ components:
schema:
type: array
items:
$ref: '#/components/schemas/User'
$ref: "#/components/schemas/User"
required: true
Message:
description: message to process
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
$ref: "#/components/schemas/Message"
application/xml:
schema:
$ref: '#/components/schemas/Message'
$ref: "#/components/schemas/Message"
required: true
CreateNewPost:
description: Post to create
content:
application/json:
schema:
$ref: '#/components/schemas/CreateNewPost'
$ref: "#/components/schemas/CreateNewPost"
application/xml:
schema:
$ref: '#/components/schemas/CreateNewPost'
$ref: "#/components/schemas/CreateNewPost"
required: true
Loading