mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-29 01:18:59 +03:00
Set more accurate swagger docs in terms of what props are required/nullable for device long URLs
This commit is contained in:
parent
b0b9902f40
commit
9949bb654d
6 changed files with 26 additions and 6 deletions
|
@ -4,17 +4,17 @@
|
||||||
"android": {
|
"android": {
|
||||||
"description": "The long URL to redirect to when the short URL is visited from a device running Android",
|
"description": "The long URL to redirect to when the short URL is visited from a device running Android",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"nullable": false
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios": {
|
||||||
"description": "The long URL to redirect to when the short URL is visited from a device running iOS",
|
"description": "The long URL to redirect to when the short URL is visited from a device running iOS",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"nullable": false
|
||||||
},
|
},
|
||||||
"desktop": {
|
"desktop": {
|
||||||
"description": "The long URL to redirect to when the short URL is visited from a desktop browser",
|
"description": "The long URL to redirect to when the short URL is visited from a desktop browser",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"nullable": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
17
docs/swagger/definitions/DeviceLongUrlsEdit.json
Normal file
17
docs/swagger/definitions/DeviceLongUrlsEdit.json
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [{
|
||||||
|
"$ref": "./DeviceLongUrls.json"
|
||||||
|
}],
|
||||||
|
"properties": {
|
||||||
|
"android": {
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"ios": {
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"desktop": {
|
||||||
|
"nullable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,6 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["android", "ios", "desktop"],
|
"required": ["android", "ios", "desktop"],
|
||||||
"allOf": [{
|
"allOf": [{
|
||||||
"$ref": "./DeviceLongUrls.json"
|
"$ref": "./DeviceLongUrlsEdit.json"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"deviceLongUrls": {
|
"deviceLongUrls": {
|
||||||
"$ref": "./DeviceLongUrls.json"
|
"$ref": "./DeviceLongUrlsEdit.json"
|
||||||
},
|
},
|
||||||
"validSince": {
|
"validSince": {
|
||||||
"description": "The date (in ISO-8601 format) from which this short code will be valid",
|
"description": "The date (in ISO-8601 format) from which this short code will be valid",
|
||||||
|
|
|
@ -296,6 +296,9 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["longUrl"],
|
"required": ["longUrl"],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"deviceLongUrls": {
|
||||||
|
"$ref": "../definitions/DeviceLongUrls.json"
|
||||||
|
},
|
||||||
"customSlug": {
|
"customSlug": {
|
||||||
"description": "A unique custom slug to be used instead of the generated short code",
|
"description": "A unique custom slug to be used instead of the generated short code",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"Short URLs"
|
"Short URLs"
|
||||||
],
|
],
|
||||||
"summary": "Create a short URL",
|
"summary": "Create a short URL",
|
||||||
"description": "Creates a short URL in a single API call. Useful for third party integrations.",
|
"description": "**[Deprecated]** Use [Create short URL](#/Short%20URLs/createShortUrl) instead",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"$ref": "../parameters/version.json"
|
"$ref": "../parameters/version.json"
|
||||||
|
|
Loading…
Reference in a new issue