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" "description": "A list of tags applied to this short URL"
}, },
"meta": {
"$ref": "./ShortUrlMeta.json"
},
"originalUrl": { "originalUrl": {
"deprecated": true, "deprecated": true,
"type": "string", "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": [ "tags": [
"games", "games",
"tech" "tech"
] ],
"meta": {
"validSince": "2017-01-21T00:00:00+02:00",
"validUntil": null,
"maxVisits": 100
}
}, },
{ {
"shortCode": "12Kb3", "shortCode": "12Kb3",
@@ -110,7 +115,12 @@
"visitsCount": 1029, "visitsCount": 1029,
"tags": [ "tags": [
"shlink" "shlink"
] ],
"meta": {
"validSince": null,
"validUntil": null,
"maxVisits": null
}
}, },
{ {
"shortCode": "123bA", "shortCode": "123bA",
@@ -118,7 +128,12 @@
"longUrl": "https://www.google.com", "longUrl": "https://www.google.com",
"dateCreated": "2015-10-01T20:34:16+02:00", "dateCreated": "2015-10-01T20:34:16+02:00",
"visitsCount": 25, "visitsCount": 25,
"tags": [] "tags": [],
"meta": {
"validSince": "2017-01-21T00:00:00+02:00",
"validUntil": null,
"maxVisits": null
}
} }
], ],
"pagination": { "pagination": {
@@ -227,7 +242,12 @@
"tags": [ "tags": [
"games", "games",
"tech" "tech"
] ],
"meta": {
"validSince": "2017-01-21T00:00:00+02:00",
"validUntil": null,
"maxVisits": 500
}
} }
} }
}, },

View File

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

View File

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