{
  "swagger": "2.0",
  "info": {
    "title": "evey/v1/rating.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "RatingService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/api/v1/media/{mediaItemId}/my-rating": {
      "get": {
        "operationId": "RatingService_GetMyThumbRating",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetMyThumbRatingResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "mediaItemId",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "RatingService"
        ]
      }
    },
    "/api/v1/media/{mediaItemId}/rate": {
      "put": {
        "operationId": "RatingService_PutThumbRating",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1PutThumbRatingResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "mediaItemId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RatingServicePutThumbRatingBody"
            }
          }
        ],
        "tags": [
          "RatingService"
        ]
      }
    },
    "/api/v1/media/{mediaItemId}/rating/aggregate": {
      "get": {
        "operationId": "RatingService_GetRatingAggregate",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetRatingAggregateResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "mediaItemId",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "RatingService"
        ]
      }
    }
  },
  "definitions": {
    "RatingServicePutThumbRatingBody": {
      "type": "object",
      "properties": {
        "value": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "v1GetMyThumbRatingResponse": {
      "type": "object",
      "properties": {
        "value": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1GetRatingAggregateResponse": {
      "type": "object",
      "properties": {
        "average": {
          "type": "number",
          "format": "double"
        },
        "count": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1PutThumbRatingResponse": {
      "type": "object",
      "properties": {
        "value": {
          "type": "integer",
          "format": "int32"
        }
      }
    }
  }
}
