{
    "swagger": "2.0",
    "info": {
        "title": "beego Test API",
        "description": "beego has a very cool tools to autogenerate documents for your API\n",
        "version": "1.0.0",
        "termsOfService": "http://beego.me/",
        "contact": {
            "email": "astaxie@gmail.com"
        },
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        }
    },
    "basePath": "/oc",
    "paths": {
        "/identity/": {
            "get": {
                "tags": [
                    "identity"
                ],
                "description": "get Identity\n\u003cbr\u003e",
                "operationId": "IdentityController.Get",
                "responses": {
                    "200": {
                        "description": "",
                        "schema": {
                            "$ref": "#/definitions/models.Identity"
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "identity"
                ],
                "description": "create identitys\n\u003cbr\u003e",
                "operationId": "IdentityController.CreateIdentity",
                "parameters": [
                    {
                        "in": "body",
                        "name": "body",
                        "description": "body for identity content",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Identity"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{int} models.Identity.Id"
                    },
                    "403": {
                        "description": "body is empty"
                    }
                }
            }
        },
        "/peer/": {
            "get": {
                "tags": [
                    "peer"
                ],
                "description": "get all peers\n\u003cbr\u003e",
                "operationId": "PeerController.GetAll",
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            },
            "post": {
                "tags": [
                    "peer"
                ],
                "description": "create peer\n\u003cbr\u003e",
                "operationId": "PeerController.Create",
                "parameters": [
                    {
                        "in": "body",
                        "name": "body",
                        "description": "The peer content",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Peer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{string} models.Peer.Id"
                    },
                    "403": {
                        "description": "body is empty"
                    }
                }
            }
        },
        "/peer/{peerId}": {
            "get": {
                "tags": [
                    "peer"
                ],
                "description": "find peer by peerid\n\u003cbr\u003e",
                "operationId": "PeerController.Get",
                "parameters": [
                    {
                        "in": "path",
                        "name": "peerId",
                        "description": "the peerid you want to get",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{peer} models.Peer"
                    },
                    "403": {
                        "description": ":peerId is empty"
                    }
                }
            },
            "put": {
                "tags": [
                    "peer"
                ],
                "description": "update the peer\n\u003cbr\u003e",
                "operationId": "PeerController.Update",
                "parameters": [
                    {
                        "in": "path",
                        "name": "peerId",
                        "description": "The peerid you want to update",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "body",
                        "name": "body",
                        "description": "The body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Peer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{peer} models.Peer"
                    },
                    "403": {
                        "description": ":peerId is empty"
                    }
                }
            },
            "delete": {
                "tags": [
                    "peer"
                ],
                "description": "delete the peer\n\u003cbr\u003e",
                "operationId": "PeerController.Delete",
                "parameters": [
                    {
                        "in": "path",
                        "name": "peerId",
                        "description": "The peerId you want to delete",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{string} delete success!"
                    },
                    "403": {
                        "description": "peerId is empty"
                    }
                }
            }
        },
        "/version/": {
            "get": {
                "tags": [
                    "version"
                ],
                "description": "get version\n\u003cbr\u003e",
                "operationId": "VersionController.GetAll",
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
        }
    },
    "definitions": {
        "models.Identity": {
            "title": "Identity",
            "type": "object",
            "properties": {
                "Id": {
                    "type": "string"
                },
                "Name": {
                    "type": "string"
                },
                "PublicKey": {
                    "type": "string"
                },
                "Url": {
                    "type": "string"
                }
            }
        },
        "models.Peer": {
            "title": "Peer",
            "type": "object",
            "properties": {
                "api_version": {
                    "type": "string"
                },
                "keywords": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "last_seen_online": {
                    "type": "string",
                    "format": "datetime"
                },
                "name": {
                    "type": "string"
                },
                "peer_id": {
                    "type": "string"
                },
                "public_key": {
                    "type": "string"
                },
                "score": {
                    "type": "integer",
                    "format": "int64"
                },
                "url": {
                    "type": "string"
                }
            }
        }
    },
    "tags": [
        {
            "name": "peer",
            "description": "Operations about peer\n"
        },
        {
            "name": "identity",
            "description": "Operations about Identitys\n"
        },
        {
            "name": "version",
            "description": "VersionController operations for Version\n"
        }
    ]
}