Skip to content

Instantly share code, notes, and snippets.

@ThatGuySam
Created October 16, 2023 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThatGuySam/6d978bf1b613bad47629814c93e0f1a2 to your computer and use it in GitHub Desktop.
Save ThatGuySam/6d978bf1b613bad47629814c93e0f1a2 to your computer and use it in GitHub Desktop.
Prefilled CodePen Open API Schema
openapi: 3.0.0
info:
title: CodePen Prefilled API
version: 1.0.0
description: API for generating CodePen Prefilled URLs using a single GET request with a JSON-encoded data parameter.
paths:
/define:
get:
summary: Create a new Prefilled CodePen
tags:
- Define
parameters:
- name: data
in: query
required: true
schema:
type: string
example: '{"title":"Test 321","html":"<strong>Hallo Warld!</strong>"}'
description: JSON-encoded string containing the properties for the prefilled CodePen.
responses:
'302':
description: Successfully created the prefilled CodePen and redirected to it
headers:
Location:
schema:
type: string
description: URL of the newly created prefilled CodePen
'400':
description: Invalid input
'500':
description: Internal Server Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment