Changed documented paths on short URL-related endpoints from short-code to short-url

This commit is contained in:
Alejandro Celaya 2018-09-20 20:52:27 +02:00
parent 80fe3a73e2
commit d53a3222d0
8 changed files with 44 additions and 14 deletions

View file

@ -1,5 +1,6 @@
{ {
"post": { "post": {
"operationId": "authenticate",
"tags": [ "tags": [
"Authentication" "Authentication"
], ],

View file

@ -1,7 +1,8 @@
{ {
"get": { "get": {
"operationId": "listShortUrls",
"tags": [ "tags": [
"ShortCodes" "Short URLs"
], ],
"summary": "List short URLs", "summary": "List short URLs",
"description": "Returns the list of short codes", "description": "Returns the list of short codes",
@ -142,8 +143,9 @@
}, },
"post": { "post": {
"operationId": "createShortUrl",
"tags": [ "tags": [
"ShortCodes" "Short URLs"
], ],
"summary": "Create short URL", "summary": "Create short URL",
"description": "Creates a new short code", "description": "Creates a new short code",

View file

@ -1,7 +1,8 @@
{ {
"get": { "get": {
"operationId": "shortenUrl",
"tags": [ "tags": [
"ShortCodes" "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": "Creates a short URL in a single API call. Useful for third party integrations",

View file

@ -1,7 +1,8 @@
{ {
"get": { "get": {
"operationId": "getShortUrl",
"tags": [ "tags": [
"ShortCodes" "Short URLs"
], ],
"summary": "Parse short code", "summary": "Parse short code",
"description": "Get the long URL behind a short code.", "description": "Get the long URL behind a short code.",
@ -78,8 +79,9 @@
}, },
"put": { "put": {
"operationId": "editShortUrl",
"tags": [ "tags": [
"ShortCodes" "Short URLs"
], ],
"summary": "Edit short code", "summary": "Edit short code",
"description": "Update certain meta arguments from an existing short URL.", "description": "Update certain meta arguments from an existing short URL.",
@ -162,8 +164,9 @@
}, },
"delete": { "delete": {
"operationId": "deleteShortUrl",
"tags": [ "tags": [
"ShortCodes" "Short URLs"
], ],
"summary": "Delete short code", "summary": "Delete short code",
"description": "Deletes the short URL for provided short code.", "description": "Deletes the short URL for provided short code.",

View file

@ -1,8 +1,8 @@
{ {
"put": { "put": {
"operationId": "editShortUrlTags",
"tags": [ "tags": [
"ShortCodes", "Short URLs"
"Tags"
], ],
"summary": "Edit tags on short URL", "summary": "Edit tags on short URL",
"description": "Edit the tags on provided short code.", "description": "Edit the tags on provided short code.",

View file

@ -1,7 +1,7 @@
{ {
"get": { "get": {
"operationId": "getShortUrlVisits",
"tags": [ "tags": [
"ShortCodes",
"Visits" "Visits"
], ],
"summary": "List visits for short URL", "summary": "List visits for short URL",

View file

@ -1,5 +1,6 @@
{ {
"get": { "get": {
"operationId": "listTags",
"tags": [ "tags": [
"Tags" "Tags"
], ],
@ -60,6 +61,7 @@
}, },
"post": { "post": {
"operationId": "createTags",
"tags": [ "tags": [
"Tags" "Tags"
], ],
@ -143,6 +145,7 @@
}, },
"put": { "put": {
"operationId": "renameTag",
"tags": [ "tags": [
"Tags" "Tags"
], ],
@ -216,6 +219,7 @@
}, },
"delete": { "delete": {
"operationId": "deleteTags",
"tags": [ "tags": [
"Tags" "Tags"
], ],

View file

@ -32,21 +32,40 @@
} }
}, },
"tags": [
{
"name": "Authentication",
"description": "Authentication-related endpoints"
},
{
"name": "Short URLs",
"description": "Operations that can be performed on short URLs"
},
{
"name": "Tags",
"description": "Let you handle the list of available tags"
},
{
"name": "Visits",
"description": "Operations to manage visits on short URLs"
}
],
"paths": { "paths": {
"/v1/authenticate": { "/v1/authenticate": {
"$ref": "paths/v1_authenticate.json" "$ref": "paths/v1_authenticate.json"
}, },
"/v1/short-codes": { "/v1/short-urls": {
"$ref": "paths/v1_short-codes.json" "$ref": "paths/v1_short-codes.json"
}, },
"/v1/short-codes/shorten": { "/v1/short-urls/shorten": {
"$ref": "paths/v1_short-codes_shorten.json" "$ref": "paths/v1_short-codes_shorten.json"
}, },
"/v1/short-codes/{shortCode}": { "/v1/short-urls/{shortCode}": {
"$ref": "paths/v1_short-codes_{shortCode}.json" "$ref": "paths/v1_short-codes_{shortCode}.json"
}, },
"/v1/short-codes/{shortCode}/tags": { "/v1/short-urls/{shortCode}/tags": {
"$ref": "paths/v1_short-codes_{shortCode}_tags.json" "$ref": "paths/v1_short-codes_{shortCode}_tags.json"
}, },
@ -54,7 +73,7 @@
"$ref": "paths/v1_tags.json" "$ref": "paths/v1_tags.json"
}, },
"/v1/short-codes/{shortCode}/visits": { "/v1/short-urls/{shortCode}/visits": {
"$ref": "paths/v1_short-codes_{shortCode}_visits.json" "$ref": "paths/v1_short-codes_{shortCode}_visits.json"
} }
} }