{
    "definitions": {
        "code": {
            "description": "Revenue code",
            "example": "1.2.3.4.75.0",
            "pattern": "^(9.)?([1-9].){4}[0-9]{1,2}.[0-9]{1,2}$",
            "type": "string"
        },
        "date": {
            "description": "Date (???)",
            "example": "2010-08-02",
            "format": "date-time",
            "type": "string"
        },
        "description": {
            "description": "Description of the revenue",
            "type": "string"
        },
        "id": {
            "description": "ID of the revenue",
            "type": "integer"
        },
        "monthly_outcome": {
            "description": "Revenue in a month",
            "type": "number"
        },
        "monthly_predicted": {
            "description": "Revenue predicted for a month",
            "type": "number"
        },
        "revenue-line": {
            "description": "Revenue line",
            "properties": {
                "code": {
                    "$ref": "#/definitions/code"
                },
                "date": {
                    "$ref": "#/definitions/date"
                },
                "description": {
                    "$ref": "#/definitions/description"
                },
                "id": {
                    "$ref": "#/definitions/id"
                },
                "monthly_outcome": {
                    "$ref": "#/definitions/monthly_outcome"
                },
                "monthly_predicted": {
                    "$ref": "#/definitions/monthly_predicted"
                }
            },
            "type": "object"
        }
    },
    "description": "Revenue list",
    "items": {
        "$ref": "#/definitions/revenue-line"
    },
    "links": [
        {
            "description": "Lists revenue lines.",
            "href": "/api/v1/receita/list",
            "method": "GET",
            "rel": "list",
            "schema": {
                "properties": {
                    "page": {
                        "default": 0,
                        "minimum": 0,
                        "type": "integer"
                    },
                    "per_page_num": {
                        "default": 100,
                        "minimum": 1,
                        "type": "integer"
                    },
                    "years": {
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 2,
                        "minItems": 1,
                        "type": "array"
                    }
                },
                "required": [
                    "years"
                ],
                "type": "object"
            },
            "title": "Revenue List"
        }
    ],
    "title": "Gastos Abertos' API",
    "type": "array"
}