Documented new meta param on swagger docs

This commit is contained in:
Alejandro Celaya 2019-07-08 18:42:53 +02:00
parent 46a27a9d0a
commit c7cfdffaf6
5 changed files with 60 additions and 6 deletions

View file

@ -29,6 +29,9 @@
},
"description": "A list of tags applied to this short URL"
},
"meta": {
"$ref": "./ShortUrlMeta.json"
},
"originalUrl": {
"deprecated": true,
"type": "string",

View file

@ -0,0 +1,21 @@
{
"type": "object",
"required": ["validSince", "validUntil", "maxVisits"],
"properties": {
"validSince": {
"description": "The date (in ISO-8601 format) from which this short code will be valid",
"type": "string",
"nullable": true
},
"validUntil": {
"description": "The date (in ISO-8601 format) until which this short code will be valid",
"type": "string",
"nullable": true
},
"maxVisits": {
"description": "The maximum number of allowed visits for this short code",
"type": "number",
"nullable": true
}
}
}

View file

@ -100,7 +100,12 @@
"tags": [
"games",
"tech"
]
],
"meta": {
"validSince": "2017-01-21T00:00:00+02:00",
"validUntil": null,
"maxVisits": 100
}
},
{
"shortCode": "12Kb3",
@ -110,7 +115,12 @@
"visitsCount": 1029,
"tags": [
"shlink"
]
],
"meta": {
"validSince": null,
"validUntil": null,
"maxVisits": null
}
},
{
"shortCode": "123bA",
@ -118,7 +128,12 @@
"longUrl": "https://www.google.com",
"dateCreated": "2015-10-01T20:34:16+02:00",
"visitsCount": 25,
"tags": []
"tags": [],
"meta": {
"validSince": "2017-01-21T00:00:00+02:00",
"validUntil": null,
"maxVisits": null
}
}
],
"pagination": {
@ -227,7 +242,12 @@
"tags": [
"games",
"tech"
]
],
"meta": {
"validSince": "2017-01-21T00:00:00+02:00",
"validUntil": null,
"maxVisits": 500
}
}
}
},

View file

@ -64,7 +64,12 @@
"tags": [
"games",
"tech"
]
],
"meta": {
"validSince": "2017-01-21T00:00:00+02:00",
"validUntil": null,
"maxVisits": 100
}
},
"text/plain": "https://doma.in/abc123"
}

View file

@ -44,7 +44,12 @@
"visitsCount": 1029,
"tags": [
"shlink"
]
],
"meta": {
"validSince": "2017-01-21T00:00:00+02:00",
"validUntil": null,
"maxVisits": 100
}
}
}
},