Skip to content

Instantly share code, notes, and snippets.

@natuanorg
Created December 19, 2025 08:01
Show Gist options
  • Select an option

  • Save natuanorg/647946c3743a78f25aea9b34268cfcf8 to your computer and use it in GitHub Desktop.

Select an option

Save natuanorg/647946c3743a78f25aea9b34268cfcf8 to your computer and use it in GitHub Desktop.
openapi: 3.0.3
info:
title: Theme Widget API
description: Simple mock API served by Cloudflare Workers
version: 1.0.0
servers:
- url: https://widget.natuan-org.workers.dev
paths:
/v1/theme/getCategoryList:
get:
summary: Get category list with resources
tags:
- Theme
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/CategoryListResponse"
/v1/theme/getResourceListByCategoryKey:
get:
summary: Get resource list by category key
tags:
- Theme
parameters:
- name: pageNum
in: query
schema:
type: integer
example: 1
- name: pageSize
in: query
schema:
type: integer
example: 20
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceListResponse"
components:
schemas:
CategoryListResponse:
type: object
properties:
errorCode:
type: integer
example: 0
errorMsg:
type: string
example: ok
data:
type: object
properties:
categoryList:
type: array
items:
$ref: "#/components/schemas/Category"
Category:
type: object
properties:
key:
type: string
example: V8XWhNLYkZ
name:
type: string
example: New
type:
type: integer
example: 9
resourceList:
type: array
items:
$ref: "#/components/schemas/Resource"
ResourceListResponse:
type: object
properties:
errorCode:
type: integer
example: 0
errorMsg:
type: string
example: ok
data:
type: object
properties:
resourceList:
type: array
items:
$ref: "#/components/schemas/Resource"
Resource:
type: object
properties:
key:
type: string
example: uzSfj_zDhA
name:
type: string
example: Cartoon Christmas Ai
thumb:
type: string
example: https://cdn.woohoostudios.io/platform/themeKit/example.webp
isFree:
type: integer
example: 0
type:
type: integer
example: 9
packageUrl:
type: string
example: https://cdn.woohoostudios.io/platform/themeKit/example.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment