Untitled
raw download clone
JSON
views 20
,
size 3285 b
{
  "openapi": "3.0.0",
  "info": {
    "description": "ium",
    "version": "1.0.0",
    "title": "IUM-recommendation-server"
  },

  "paths": {
    "/predict": {
      "parameters": [
        {
          "name": "userId",
          "in": "query",
          "required": true,
          "description": "User ID for which you want to get recommendation",
          "type": "number"
        }, 
        {
          "name": "productId",
          "in": "query",
          "required": true,
          "description": "Product ID",
          "type": "number"
        }
      ],
      "get": {
        "summary": "Return prediction with tests A/B",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/components/schemas/predictTestABRequest"
            }
          }
        }
      }
    },

    "/collaborative": {
      "parameters": [
        {
          "name": "userId",
          "in": "query",
          "required": true,
          "description": "User ID for which you want to get recommendation",
          "type": "number"
        }
      ],
      "get": {
        "summary": "Return prediction using collaborative filtering model",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/components/schemas/collaborativeFilteringRequest"
            }
          }
        }
      }
    },

    "/content": {
      "parameters": [
        {
          "name": "productId",
          "in": "query",
          "required": true,
          "description": "Product ID",
          "type": "number"
        }
      ],
      "get": {
        "summary": "Return prediction using content based model",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/components/schemas/contentBasedRequest"
            }
          }
        }
      }
    }
  },

  "components": {
    "schemas": {
      "predictTestABRequest": {
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "format": "string"
            },
            "prediction": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "product": {
              "type": "number"
            },
            "user": {
              "type": "number"
            }
          }
      },
      "collaborativeFilteringRequest":{
        "type": "object",
          "properties": {
            "prediction": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "user": {
              "type": "number"
            }
          }
      },
      "contentBasedRequest":{
        "type": "object",
          "properties": {
            "prediction": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "product": {
              "type": "number"
            }
          }
      }
    }
  }
}
close fullscreen
Login or Register to edit or fork this paste. It's free.