Skip to content

Commit

Permalink
[PS-58] Fix ReadME having the wrong instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Robinson <[email protected]>
  • Loading branch information
BillyDotWS committed Oct 25, 2024
1 parent 489903b commit 7943aeb
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM node:20-alpine
WORKDIR /app
RUN npm install -g @mockoon/cli
COPY facebook-mock-api.json /app/
COPY index.html /app/
EXPOSE 3000

CMD ["mockoon-cli", "start", "--data", "/app/facebook-mock-api.json", "--port", "3000"]
37 changes: 36 additions & 1 deletion facebook-mock-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"responses": [
{
"uuid": "21544b14-9c94-4152-8ac8-26aa13860eb2",
"body": "{\r\n \"data\": [\r\n {\r\n \"access_token\": \"{facebook-for-developers-page-access-token}\",\r\n \"category\": \"Internet Company\",\r\n \"category_list\": [\r\n {\r\n \"id\": \"2256\",\r\n \"name\": \"Internet Company\"\r\n }\r\n ],\r\n \"name\": \"Facebook for Developers\",\r\n \"id\": \"{facebook-for-developers-page-id}\",\r\n \"tasks\": [\r\n \"ANALYZE\",\r\n \"ADVERTISE\",\r\n \"MODERATE\",\r\n \"CREATE_CONTENT\"\r\n ]\r\n }\r\n ]\r\n}",
"body": "{\r\n \"data\": [\r\n {\r\n \"access_token\": \"token\",\r\n \"category\": \"Internet Company\",\r\n \"category_list\": [\r\n {\r\n \"id\": \"2256\",\r\n \"name\": \"Internet Company\"\r\n }\r\n ],\r\n \"name\": \"Acme Inc\",\r\n \"id\": \"page_id\",\r\n \"tasks\": [\r\n \"ANALYZE\",\r\n \"ADVERTISE\",\r\n \"MANAGE\",\r\n \"MODERATE\",\r\n \"CREATE_CONTENT\"\r\n ]\r\n }\r\n ]\r\n}",
"latency": 500,
"statusCode": 200,
"label": "Details Response",
Expand Down Expand Up @@ -393,9 +393,44 @@
"responseMode": null,
"streamingMode": null,
"streamingInterval": 0
},
{
"uuid": "2d9a4d9b-31c0-4cf5-aa93-d8cf568168d5",
"type": "http",
"documentation": "",
"method": "get",
"endpoint": "",
"responses": [
{
"uuid": "0b36d269-97a7-4616-bf3e-a20295865791",
"body": "",
"latency": 0,
"statusCode": 308,
"label": "",
"headers": [],
"bodyType": "FILE",
"filePath": "index.html",
"databucketID": "",
"sendFileAsBody": true,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null,
"streamingMode": null,
"streamingInterval": 0
}
],
"rootChildren": [
{
"type": "route",
"uuid": "2d9a4d9b-31c0-4cf5-aa93-d8cf568168d5"
},
{
"type": "folder",
"uuid": "9b0728c3-e7ae-43b0-bfa2-e472ef3c65b5"
Expand Down
40 changes: 40 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mock Facebook API - Swagger UI</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui.css" />
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
.swagger-ui {
background-color: #f4f4f4;
padding: 20px;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-bundle.js"> </script>
<script>
const ui = SwaggerUIBundle({
url: "https://raw.githubusercontent.com/PostSuite/api-mocked-facebook/refs/heads/dev/docs/openapi/openapi.json",
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
],
deepLinking: true,
displayOperationId: false,
filter: false,
tryItOutEnabled: true,
defaultModelsExpandDepth: -1,
});

window.ui = ui;
</script>
</body>
</html>

0 comments on commit 7943aeb

Please sign in to comment.