{
  "openapi": "3.0.0",
  "info": {
    "title": "api",
    "version": "0.0.1",
    "description": "API Test",
    "contact": {
      "name": "Wesley Milan"
    }
  },
  "paths": {
    "/ping": {
      "get": {
        "x-controller-name": "PingController",
        "x-operation-name": "ping",
        "tags": [
          "PingController"
        ],
        "responses": {
          "200": {
            "description": "Ping Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingResponse"
                }
              }
            }
          }
        },
        "operationId": "PingController.ping"
      }
    },
    "/products/count": {
      "get": {
        "x-controller-name": "ProductController",
        "x-operation-name": "count",
        "tags": [
          "ProductController"
        ],
        "responses": {
          "200": {
            "description": "Product model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Product.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Product>"
                }
              }
            }
          }
        ],
        "operationId": "ProductController.count"
      }
    },
    "/products/{id}": {
      "put": {
        "x-controller-name": "ProductController",
        "x-operation-name": "replaceById",
        "tags": [
          "ProductController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Product PUT success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "number"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Product"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ProductController.replaceById"
      },
      "patch": {
        "x-controller-name": "ProductController",
        "x-operation-name": "updateById",
        "tags": [
          "ProductController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Product PATCH success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "number"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ProductController.updateById"
      },
      "get": {
        "x-controller-name": "ProductController",
        "x-operation-name": "findById",
        "tags": [
          "ProductController"
        ],
        "responses": {
          "200": {
            "description": "Product model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "number"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product.Filter"
                }
              }
            }
          }
        ],
        "operationId": "ProductController.findById"
      },
      "delete": {
        "x-controller-name": "ProductController",
        "x-operation-name": "deleteById",
        "tags": [
          "ProductController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Product DELETE success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "number"
            },
            "required": true
          }
        ],
        "operationId": "ProductController.deleteById"
      }
    },
    "/products": {
      "post": {
        "x-controller-name": "ProductController",
        "x-operation-name": "create",
        "tags": [
          "ProductController"
        ],
        "responses": {
          "200": {
            "description": "Product model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewProduct"
              }
            }
          }
        },
        "operationId": "ProductController.create"
      },
      "patch": {
        "x-controller-name": "ProductController",
        "x-operation-name": "updateAll",
        "tags": [
          "ProductController"
        ],
        "responses": {
          "200": {
            "description": "Product PATCH success count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Product.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Product>"
                }
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPartial"
              }
            }
          }
        },
        "operationId": "ProductController.updateAll"
      },
      "get": {
        "x-controller-name": "ProductController",
        "x-operation-name": "find",
        "tags": [
          "ProductController"
        ],
        "responses": {
          "200": {
            "description": "Array of Product model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "ProductController.find"
      }
    }
  },
  "servers": [
    {
      "url": "https://test-aws.muhoracio.com.br"
    }
  ],
  "components": {
    "schemas": {
      "Product": {
        "title": "Product",
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "cost": {
            "type": "number"
          },
          "price": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "category",
          "price"
        ],
        "additionalProperties": false
      },
      "NewProduct": {
        "title": "NewProduct",
        "type": "object",
        "description": "(tsType: Omit<Product, 'id'>, schemaOptions: { title: 'NewProduct', exclude: [ 'id' ] })",
        "properties": {
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "cost": {
            "type": "number"
          },
          "price": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "category",
          "price"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<Product, 'id'>"
      },
      "ProductWithRelations": {
        "title": "ProductWithRelations",
        "type": "object",
        "description": "(tsType: ProductWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "cost": {
            "type": "number"
          },
          "price": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "category",
          "price"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ProductWithRelations"
      },
      "ProductPartial": {
        "title": "ProductPartial",
        "type": "object",
        "description": "(tsType: Partial<Product>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "cost": {
            "type": "number"
          },
          "price": {
            "type": "number"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<Product>"
      },
      "PingResponse": {
        "type": "object",
        "title": "PingResponse",
        "properties": {
          "greeting": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "properties": {
              "Content-Type": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      },
      "loopback.Count": {
        "type": "object",
        "title": "loopback.Count",
        "x-typescript-type": "@loopback/repository#Count",
        "properties": {
          "count": {
            "type": "number"
          }
        }
      },
      "Product.Filter": {
        "type": "object",
        "title": "Product.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "category": {
                    "type": "boolean"
                  },
                  "cost": {
                    "type": "boolean"
                  },
                  "price": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "name",
                    "category",
                    "cost",
                    "price"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Product.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Product>"
      },
      "Product.Filter1": {
        "type": "object",
        "title": "Product.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "Product.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "category": {
                    "type": "boolean"
                  },
                  "cost": {
                    "type": "boolean"
                  },
                  "price": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "name",
                    "category",
                    "cost",
                    "price"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Product.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Product>"
      }
    }
  }
}