1 year ago

#386257

test-img

g.georgecccc

how to describe react native sockets in swagger API?

for example i can show socket listener

there is no route, its just socket listener and how can i describe this socket event to show like this? -> 1

![sample swagger][]

# Get information about user 
Socket Event emit: 'getUserData’
Emit body: { email: String, token: String }
Socket Event listener: ‘getUserData’
Returned body:  { 
    userData: { picture: String,
          miniPicture: String,
          microPicture:String,
          username: String,
          email: String,
          location: String,
          description: String,
          interests: Array,  
          socialIntegrations: 
   [{type: String (Instagram/Twitter/LinkedIn), id: String, username: String, profileUrl:  String}],
     }, 
     eventsHosted: Array of event objects
}

reactjs

react-native

websocket

swagger

swagger-ui

0 Answers

Your Answer

Accepted video resources