Skip to content

Commit

Permalink
added missing relocations apidocs
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Nov 14, 2023
1 parent 2a59835 commit 558d49b
Show file tree
Hide file tree
Showing 15 changed files with 608 additions and 0 deletions.
66 changes: 66 additions & 0 deletions modules/contentbox/apidocs/relocations/create/example.200.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"data": {
"relatedContent": {
"excerpt": "",
"numberOfVersions": "10",
"cache": true,
"createdDate": "2013-07-20T15:38:47+00:00",
"numberOfHits": "137",
"layout": "pages",
"cacheTimeout": 0,
"isPublished": true,
"HTMLTitle": "",
"contentType": "Page",
"modifiedDate": "2016-08-05T14:42:30+00:00",
"parent": {},
"lastEditor": {
"avatarLink": "//www.gravatar.com/avatar.php?gravatar_id=61accb18322422e84424414b5652719f&s=40&r=PG",
"name": "Luis Majano",
"authorID": "77abddba-a444-11eb-ab6f-0290cc502ae3",
"email": "[email protected]"
},
"showInSearch": true,
"HTMLKeywords": "",
"featuredImage": "",
"numberOfComments": "0",
"isDeleted": false,
"creator": {
"avatarLink": "//www.gravatar.com/avatar.php?gravatar_id=61accb18322422e84424414b5652719f&s=40&r=PG",
"name": "Luis Majano",
"authorID": "77abddba-a444-11eb-ab6f-0290cc502ae3",
"email": "[email protected]"
},
"HTMLDescription": "",
"slug": "support",
"order": 6,
"contentID": "779cd2de-a444-11eb-ab6f-0290cc502ae3",
"siteID": "1c81d376-a481-11eb-ab6f-0290cc502ae3",
"publishedDate": "2013-07-20T15:38:00+00:00",
"showInMenu": true,
"categories": [
"coldbox"
],
"markup": "html",
"expireDate": "",
"title": "support",
"numberOfChildren": "0",
"featuredImageURL": "",
"allowComments": false,
"cacheLastAccessTimeout": 0
},
"slug": "old-support",
"createdDate": "2023-11-14T18:03:05+00:00",
"relocationID": "4028fbed8bcef561018bcf004a100000",
"target": "",
"modifiedDate": "2023-11-14T18:03:05+00:00"
},
"error": false,
"pagination": {
"totalPages": 1,
"maxRows": 0,
"offset": 0,
"page": 1,
"totalRecords": 0
},
"messages": []
}
35 changes: 35 additions & 0 deletions modules/contentbox/apidocs/relocations/create/example.400.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"data": {
"slug": [
{
"message": "The 'slug' value is required",
"validationData": true,
"errorMetadata": {},
"rejectedValue": "",
"validationType": "Required",
"field": "slug"
}
],
"site": [
{
"message": "The 'site' value is required",
"validationData": true,
"errorMetadata": {},
"rejectedValue": "",
"validationType": "Required",
"field": "site"
}
]
},
"error": true,
"pagination": {
"totalPages": 1,
"maxRows": 0,
"offset": 0,
"page": 1,
"totalRecords": 0
},
"messages": [
"Validation exceptions occurred, please see the data"
]
}
38 changes: 38 additions & 0 deletions modules/contentbox/apidocs/relocations/create/requestBody.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"description": "Needed fields for a site relocation",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"slug",
"site"
],
"properties": {
"slug": {
"description": "The slug of the relocation",
"type": "string"
},
"site": {
"description": "The id of the site this relocation belongs to",
"type": "string"
},
"relatedContent": {
"description": "The id of the content this relocation belongs to",
"type": "string"
},
"target": {
"description": "An optional manual target - may be used if no content is assigned",
"type": "string"
}
},
"example": {
"slug": "/about",
"site": "1c81d376-a481-11eb-ab6f-0290cc502ae3",
"relatedContent" : "779cd2de-a444-11eb-ab6f-0290cc502ae3"
}
}
}
}
}
43 changes: 43 additions & 0 deletions modules/contentbox/apidocs/relocations/create/responses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref" : "../../_schemas/app-response.json"
},
"example": {
"$ref": "example.200.json"
}
}
}
},

"400": {
"description": "Invalid Request",
"content": {
"application/json": {
"example": {
"$ref": "example.400.json"
},
"schema": {
"$ref" : "../../_schemas/app-response.json"
}
}
}
},

"401": {
"description": "Invalid or Missing Authentication Credentials",
"content": {
"application/json": {
"example": {
"$ref": "../../_schemas/app-invalid.json"
},
"schema": {
"$ref" : "../../_schemas/app-response.json"
}
}
}
}
}
14 changes: 14 additions & 0 deletions modules/contentbox/apidocs/relocations/delete/example.200.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"data": {},
"error": false,
"pagination": {
"totalPages": 1,
"maxRows": 0,
"offset": 0,
"page": 1,
"totalRecords": 0
},
"messages": [
"Relocation deleted!"
]
}
14 changes: 14 additions & 0 deletions modules/contentbox/apidocs/relocations/delete/example.404.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"data": "ff8081817bbc8127017bbca6f8ff000",
"error": true,
"pagination": {
"totalPages": 1,
"maxRows": 0,
"offset": 0,
"page": 1,
"totalRecords": 0
},
"messages": [
"The record you requested cannot be found in this system"
]
}
43 changes: 43 additions & 0 deletions modules/contentbox/apidocs/relocations/delete/responses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref" : "../../_schemas/app-response.json"
},
"example": {
"$ref": "example.200.json"
}
}
}
},

"401": {
"description": "Invalid or Missing Authentication Credentials",
"content": {
"application/json": {
"example": {
"$ref": "../../_schemas/app-invalid.json"
},
"schema": {
"$ref" : "../../_schemas/app-response.json"
}
}
}
},

"404": {
"description": "Not Found",
"content": {
"application/json": {
"example": {
"$ref": "example.404.json"
},
"schema": {
"$ref" : "../../_schemas/app-response.json"
}
}
}
}
}
68 changes: 68 additions & 0 deletions modules/contentbox/apidocs/relocations/index/example.200.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"data": [
{
"relatedContent": {
"excerpt": "",
"numberOfVersions": "10",
"cache": true,
"createdDate": "2013-07-20T15:38:47+00:00",
"numberOfHits": "137",
"layout": "pages",
"cacheTimeout": 0,
"isPublished": true,
"HTMLTitle": "",
"contentType": "Page",
"modifiedDate": "2016-08-05T14:42:30+00:00",
"parent": {},
"lastEditor": {
"avatarLink": "//www.gravatar.com/avatar.php?gravatar_id=61accb18322422e84424414b5652719f&s=40&r=PG",
"name": "Luis Majano",
"authorID": "77abddba-a444-11eb-ab6f-0290cc502ae3",
"email": "[email protected]"
},
"showInSearch": true,
"HTMLKeywords": "",
"featuredImage": "",
"numberOfComments": "0",
"isDeleted": false,
"creator": {
"avatarLink": "//www.gravatar.com/avatar.php?gravatar_id=61accb18322422e84424414b5652719f&s=40&r=PG",
"name": "Luis Majano",
"authorID": "77abddba-a444-11eb-ab6f-0290cc502ae3",
"email": "[email protected]"
},
"HTMLDescription": "",
"slug": "support",
"order": 6,
"contentID": "779cd2de-a444-11eb-ab6f-0290cc502ae3",
"siteID": "1c81d376-a481-11eb-ab6f-0290cc502ae3",
"publishedDate": "2013-07-20T15:38:00+00:00",
"showInMenu": true,
"categories": [
"coldbox"
],
"markup": "html",
"expireDate": "",
"title": "support",
"numberOfChildren": "0",
"featuredImageURL": "",
"allowComments": false,
"cacheLastAccessTimeout": 0
},
"slug": "old-support",
"createdDate": "2023-11-14T18:03:05+00:00",
"relocationID": "4028fbed8bcef561018bcf004a100000",
"target": "",
"modifiedDate": "2023-11-14T18:03:05+00:00"
}
],
"error": false,
"pagination": {
"totalPages": 1,
"maxRows": 25,
"offset": 0,
"page": 1,
"totalRecords": 1
},
"messages": []
}
Loading

0 comments on commit 558d49b

Please sign in to comment.