Reflected changes to visits stats in the swagger docs

This commit is contained in:
Alejandro Celaya 2023-01-02 12:35:15 +01:00
parent 37c8328eed
commit d734578f74
4 changed files with 23 additions and 7 deletions

View File

@ -38,7 +38,7 @@
"description": "**[DEPRECATED]** Use `visitsSummary.total` instead."
},
"visitsSummary": {
"$ref": "./ShortUrlVisitsSummary.json"
"$ref": "./VisitsSummary.json"
},
"tags": {
"type": "array",

View File

@ -1,14 +1,22 @@
{
"type": "object",
"required": ["visitsCount", "orphanVisitsCount"],
"required": ["nonOrphanVisits", "orphanVisits", "visitsCount", "orphanVisitsCount"],
"properties": {
"nonOrphanVisits": {
"$ref": "./VisitsSummary.json"
},
"orphanVisits": {
"$ref": "./VisitsSummary.json"
},
"visitsCount": {
"deprecated": true,
"type": "number",
"description": "The total amount of visits received on any short URL."
"description": "**[DEPRECATED]** Use nonOrphanVisits.total instead"
},
"orphanVisitsCount": {
"deprecated": true,
"type": "number",
"description": "The total amount of visits that could not be matched to a short URL (visits to the base URL, an invalid short URL or any other kind of 404)."
"description": "**[DEPRECATED]** Use orphanVisits.total instead"
}
}
}

View File

@ -3,7 +3,7 @@
"required": ["total", "nonBots", "bots"],
"properties": {
"total": {
"description": "The total amount of visits that this short URL has received.",
"description": "The total amount of visits.",
"type": "integer"
},
"nonBots": {

View File

@ -31,8 +31,16 @@
},
"example": {
"visits": {
"visitsCount": 1569874,
"orphanVisitsCount": 71345
"nonOrphanVisits": {
"total": 64994,
"nonBots": 64986,
"bots": 8
},
"orphanVisits": {
"total": 37,
"nonBots": 34,
"bots": 3
}
}
}
}