--- openapi: 3.0.1 info: title: API V1 version: v1 paths: "/applications": parameters: - name: name in: query description: name of app required: true schema: type: string post: summary: create application responses: '200': description: successful content: application/json: schema: type: object properties: token: type: string description: application token example: 5Z1fFC7CxNjm "/applications/{token}": parameters: - name: token in: path description: token required: true schema: type: string get: summary: show application responses: '200': description: successful content: application/json: schema: type: object properties: token: type: string description: application_token example: 5Z1fFC7CxNjm name: type: string description: name of app example: FoodApp chats_count: type: integer example: 23 put: summary: update application responses: '200': description: successful content: application/json: schema: type: object properties: token: type: string description: application_token example: 5Z1fFC7CxNjm name: type: string description: name of app example: FoodTruckApp chats_count: type: integer example: 23 "/all-applications": get: summary: list applications responses: '200': description: successful content: application/json: schema: type: array items: type: object properties: token: type: string description: token of application example: 5Z1fFC7CxNjm name: type: string description: name of app example: FoodApp "/applications/{application_token}/chats": parameters: - name: application_token in: path description: application_token required: true schema: type: string get: summary: list chats responses: '200': description: successful content: application/json: schema: type: array items: type: object properties: token: type: string description: token of application example: 5Z1fFC7CxNjm number: type: integer description: number of chat example: 13 post: summary: create chat responses: '200': description: successful content: application/json: schema: type: object properties: number: type: integer description: chat number example: 24 "/applications/{application_token}/chats/{number}": parameters: - name: application_token in: path description: application_token required: true schema: type: string - name: number in: path description: number required: true schema: type: string - name: body in: query description: message body required: true schema: type: string get: summary: show chat responses: '200': description: successful content: application/json: schema: type: object properties: token: type: string description: application_token example: 5Z1fFC7CxNjm number: type: integer description: chat number example: 23 messages_count: type: integer example: 420 "/all-chats": get: summary: all_chats chat responses: '200': description: successful "/applications/{application_token}/chats/{chat_number}/messages": parameters: - name: application_token in: path description: application_token required: true schema: type: string - name: chat_number in: path description: chat_number required: true schema: type: string - name: query in: query description: query to match message bodies partially with required: false schema: type: string get: summary: list messages responses: '200': description: successful content: application/json: schema: type: object properties: body: type: string description: body of message example: "Claim out front ready wear political. From learn let outside." number: type: integer description: number of message example: 230 post: summary: create message parameters: - name: body in: query description: message body to be updated required: true schema: type: string responses: '200': description: successful content: application/json: schema: type: object properties: number: type: integer description: message number example: 380 "/applications/{application_token}/chats/{chat_number}/messages/{number}": parameters: - name: application_token in: path description: application_token required: true schema: type: string - name: chat_number in: path description: chat_number required: true schema: type: string - name: number in: path description: number required: true schema: type: string get: summary: show message responses: '200': description: successful content: application/json: schema: type: object properties: number: type: integer description: number of message example: 380 body: type: text example: "Claim out front ready wear political. From learn let outside." put: summary: update message parameters: - name: body in: query description: message body to be updated required: true schema: type: string responses: '200': description: successful content: application/json: schema: type: object properties: number: type: integer description: number of message example: 380 body: type: text example: "Claim out front ready wear political. From learn let outside." servers: - url: https://{defaultHost} variables: defaultHost: default: www.example.com