Interactive API demos
-
TfL and Petstore playgrounds are live with explanatory context and defaults.
+
TfL, Petstore, and Platzi playgrounds are live with explanatory context and defaults.
These pages are placeholders. Technical content and demos live under{' '}
- /docs , /tfl , and /petstore .
+ /docs , /tfl , /petstore , and /platzi .
Customers
diff --git a/src/pages/platzi/api-playground.tsx b/src/pages/platzi/api-playground.tsx
new file mode 100644
index 0000000..e196784
--- /dev/null
+++ b/src/pages/platzi/api-playground.tsx
@@ -0,0 +1,23 @@
+import React from 'react';
+import Layout from '@theme/Layout';
+import Link from '@docusaurus/Link';
+import ApiReferenceClient from '@site/src/components/ApiReferenceClient';
+
+export default function PlatziApiPlaygroundPage(): React.JSX.Element {
+ return (
+
+
+
+ Curated demo playground against the Platzi Fake Store API. For scope and caveats, read the{' '}
+ Platzi playground guide.
+
+
+
+
+ );
+}
diff --git a/src/theme/Navbar/Content/index.tsx b/src/theme/Navbar/Content/index.tsx
index e83c735..4c59040 100644
--- a/src/theme/Navbar/Content/index.tsx
+++ b/src/theme/Navbar/Content/index.tsx
@@ -81,7 +81,9 @@ export default function NavbarContent(): ReactNode {
? '/openapi/petstore-playground.json'
: pathname === '/tfl/api-playground'
? '/openapi/tfl-playground.json'
- : null;
+ : pathname === '/platzi/api-playground'
+ ? '/openapi/platzi-playground.json'
+ : null;
const items = useNavbarItems();
const [leftItems, rightItems] = splitNavbarItems(items);
diff --git a/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx b/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx
index 9894fe4..ce5dccf 100644
--- a/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx
+++ b/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx
@@ -112,6 +112,40 @@ const sections: MenuSection[] = [
],
apiPlaygroundPath: '/petstore/api-playground',
},
+ {
+ heading: 'Platzi',
+ groups: [
+ {
+ label: 'Getting started',
+ items: [
+ {label: 'Overview', to: '/platzi/getting-started'},
+ {label: 'Quickstart', to: '/platzi/getting-started/quickstart'},
+ {label: 'Authentication', to: '/platzi/getting-started/authentication'},
+ {label: 'Error handling', to: '/platzi/getting-started/error-handling'},
+ {label: 'Playground guide', to: '/platzi/getting-started/playground'},
+ ],
+ },
+ {
+ label: 'Products',
+ items: [
+ {label: 'Overview', to: '/platzi/products'},
+ {label: 'List and paginate', to: '/platzi/products/list'},
+ ],
+ },
+ {
+ label: 'Users',
+ items: [
+ {label: 'Overview', to: '/platzi/users'},
+ {label: 'Check email', to: '/platzi/users/check-email'},
+ ],
+ },
+ {
+ label: 'Locations',
+ items: [{label: 'Overview', to: '/platzi/locations'}],
+ },
+ ],
+ apiPlaygroundPath: '/platzi/api-playground',
+ },
];
function normalizePath(route: string): string {
@@ -135,7 +169,9 @@ export default function NavbarMobilePrimaryMenu(): ReactNode {
? '/openapi/petstore-playground.json'
: pathname === '/tfl/api-playground'
? '/openapi/tfl-playground.json'
- : null;
+ : pathname === '/platzi/api-playground'
+ ? '/openapi/platzi-playground.json'
+ : null;
return (
diff --git a/static/openapi/platzi-playground.json b/static/openapi/platzi-playground.json
new file mode 100644
index 0000000..1551c80
--- /dev/null
+++ b/static/openapi/platzi-playground.json
@@ -0,0 +1,369 @@
+{
+ "openapi": "3.0.3",
+ "info": {
+ "title": "Platzi Fake Store API — DevDocify playground",
+ "version": "playground-1.0.0",
+ "description": "Curated OpenAPI subset for the DevDocify Platzi playground. This file documents a stable demo-focused surface of the public API hosted at api.escuelajs.co."
+ },
+ "servers": [
+ {
+ "url": "https://api.escuelajs.co/api/v1",
+ "description": "Platzi Fake Store public API"
+ }
+ ],
+ "tags": [
+ {"name": "Products", "description": "Product listing and pagination."},
+ {"name": "Catalog", "description": "Category listing."},
+ {"name": "Users", "description": "User listing and email availability checks."},
+ {"name": "Auth", "description": "JWT login, refresh, and profile operations."},
+ {"name": "Locations", "description": "Geospatial location examples."}
+ ],
+ "paths": {
+ "/products": {
+ "get": {
+ "tags": ["Products"],
+ "summary": "List products",
+ "description": "Returns products with optional offset pagination.",
+ "operationId": "platziListProducts",
+ "parameters": [
+ {
+ "name": "offset",
+ "in": "query",
+ "required": false,
+ "schema": {"type": "integer", "minimum": 0, "default": 0},
+ "example": 0
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "required": false,
+ "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 10},
+ "example": 10
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {"$ref": "#/components/schemas/Product"}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/categories": {
+ "get": {
+ "tags": ["Catalog"],
+ "summary": "List categories",
+ "operationId": "platziListCategories",
+ "responses": {
+ "200": {
+ "description": "Success.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {"$ref": "#/components/schemas/Category"}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/users": {
+ "get": {
+ "tags": ["Users"],
+ "summary": "List users",
+ "operationId": "platziListUsers",
+ "parameters": [
+ {
+ "name": "offset",
+ "in": "query",
+ "required": false,
+ "schema": {"type": "integer", "minimum": 0, "default": 0},
+ "example": 0
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "required": false,
+ "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 10},
+ "example": 10
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {"$ref": "#/components/schemas/User"}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/users/is-available": {
+ "post": {
+ "tags": ["Users"],
+ "summary": "Check email availability",
+ "operationId": "platziIsUserEmailAvailable",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/EmailCheckRequest"},
+ "example": {"email": "john@mail.com"}
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Success.",
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/EmailCheckResponse"},
+ "example": {"isAvailable": false}
+ }
+ }
+ },
+ "400": {"description": "Bad request."}
+ }
+ }
+ },
+ "/auth/login": {
+ "post": {
+ "tags": ["Auth"],
+ "summary": "Login",
+ "description": "Returns an access token and refresh token.",
+ "operationId": "platziLogin",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/LoginRequest"},
+ "example": {"email": "john@mail.com", "password": "changeme"}
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "Login success.",
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/AuthTokens"}
+ }
+ }
+ },
+ "200": {
+ "description": "Login success (alternative status).",
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/AuthTokens"}
+ }
+ }
+ },
+ "401": {"description": "Invalid credentials."}
+ }
+ }
+ },
+ "/auth/refresh-token": {
+ "post": {
+ "tags": ["Auth"],
+ "summary": "Refresh access token",
+ "operationId": "platziRefreshToken",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/RefreshTokenRequest"},
+ "example": {"refreshToken": ""}
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "Refresh success.",
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/AuthTokens"}
+ }
+ }
+ },
+ "200": {
+ "description": "Refresh success (alternative status).",
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/AuthTokens"}
+ }
+ }
+ },
+ "401": {"description": "Invalid or expired refresh token."}
+ }
+ }
+ },
+ "/auth/profile": {
+ "get": {
+ "tags": ["Auth"],
+ "summary": "Get authenticated profile",
+ "operationId": "platziProfile",
+ "security": [{"bearerAuth": []}],
+ "responses": {
+ "200": {
+ "description": "Success.",
+ "content": {
+ "application/json": {
+ "schema": {"$ref": "#/components/schemas/User"}
+ }
+ }
+ },
+ "401": {"description": "Missing or invalid bearer token."}
+ }
+ }
+ },
+ "/locations": {
+ "get": {
+ "tags": ["Locations"],
+ "summary": "List locations",
+ "description": "Returns random or origin-filtered locations for map-style demos.",
+ "operationId": "platziListLocations",
+ "parameters": [
+ {
+ "name": "size",
+ "in": "query",
+ "required": false,
+ "schema": {"type": "integer", "minimum": 1, "maximum": 50, "default": 5},
+ "example": 5
+ },
+ {
+ "name": "origin",
+ "in": "query",
+ "required": false,
+ "description": "Latitude,longitude pair.",
+ "schema": {"type": "string"},
+ "example": "6.2071641,-75.5720321"
+ },
+ {
+ "name": "radius",
+ "in": "query",
+ "required": false,
+ "schema": {"type": "number", "format": "float"},
+ "example": 10
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {"$ref": "#/components/schemas/Location"}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "bearerAuth": {
+ "type": "http",
+ "scheme": "bearer",
+ "bearerFormat": "JWT"
+ }
+ },
+ "schemas": {
+ "Category": {
+ "type": "object",
+ "properties": {
+ "id": {"type": "integer"},
+ "name": {"type": "string"},
+ "slug": {"type": "string"},
+ "image": {"type": "string", "format": "uri"}
+ }
+ },
+ "Product": {
+ "type": "object",
+ "properties": {
+ "id": {"type": "integer"},
+ "title": {"type": "string"},
+ "slug": {"type": "string"},
+ "price": {"type": "number"},
+ "description": {"type": "string"},
+ "category": {"$ref": "#/components/schemas/Category"},
+ "images": {
+ "type": "array",
+ "items": {"type": "string", "format": "uri"}
+ }
+ }
+ },
+ "User": {
+ "type": "object",
+ "properties": {
+ "id": {"type": "integer"},
+ "email": {"type": "string", "format": "email"},
+ "name": {"type": "string"},
+ "role": {"type": "string"},
+ "avatar": {"type": "string", "format": "uri"}
+ }
+ },
+ "EmailCheckRequest": {
+ "type": "object",
+ "required": ["email"],
+ "properties": {
+ "email": {"type": "string", "format": "email"}
+ }
+ },
+ "EmailCheckResponse": {
+ "type": "object",
+ "properties": {
+ "isAvailable": {"type": "boolean"}
+ }
+ },
+ "LoginRequest": {
+ "type": "object",
+ "required": ["email", "password"],
+ "properties": {
+ "email": {"type": "string", "format": "email"},
+ "password": {"type": "string"}
+ }
+ },
+ "RefreshTokenRequest": {
+ "type": "object",
+ "required": ["refreshToken"],
+ "properties": {
+ "refreshToken": {"type": "string"}
+ }
+ },
+ "AuthTokens": {
+ "type": "object",
+ "properties": {
+ "access_token": {"type": "string"},
+ "refresh_token": {"type": "string"}
+ }
+ },
+ "Location": {
+ "type": "object",
+ "properties": {
+ "id": {"type": "number"},
+ "name": {"type": "string"},
+ "description": {"type": "string"},
+ "latitude": {"type": "number"},
+ "longitude": {"type": "number"}
+ }
+ }
+ }
+ }
+}