SoURL

SoURL · GPT-Aktionen

Jump Jump API Documentation

🚀🚀🚀

  • POST /short-link/创建短链接

    创建短链接

  • GET /short-link/{id}获取指定 ID 短链接

    获取系统配置信息

Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "Jump Jump API Documentation",
    "description": "🚀🚀🚀",
    "contact": {
      "name": "MJ Ma",
      "url": "https://www.linkedin.com/in/mj-profile/",
      "email": "m.mjw.ma@gmail.com"
    },
    "license": {
      "name": "MIT",
      "url": "https://github.com/jwma/jump-jump/blob/master/LICENSE"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://dashboard.sourl.xyz/v1"
    }
  ],
  "paths": {
    "/short-link/": {
      "post": {
        "tags": [
          "短链接"
        ],
        "operationId": "createShortLink",
        "summary": "创建短链接",
        "description": "创建短链接",
        "requestBody": {
          "description": "创建短链接请求",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShortLinkAPIRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Response"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreateShortLinkAPIResponseData"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {}
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/short-link/{id}": {
      "get": {
        "tags": [
          "短链接"
        ],
        "operationId": "getShortLinkDetails",
        "summary": "获取指定 ID 短链接",
        "description": "获取系统配置信息",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "短链接 ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Response"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/GetShortLinkAPIResponseData"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {}
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CreateShortLinkAPIRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "描述",
            "example": "Jump Jump project"
          },
          "id": {
            "type": "string",
            "description": "只有管理员可以在创建的时候指定 ID",
            "format": "string",
            "example": "RANDOM_ID"
          },
          "idLength": {
            "type": "integer",
            "description": "短链接 ID 长度",
            "format": "int",
            "example": 4
          },
          "isEnable": {
            "type": "boolean",
            "description": "是否启用",
            "format": "boolean",
            "example": true
          },
          "url": {
            "type": "string",
            "description": "目标链接",
            "example": "https://github.com/jwma/jump-jump"
          }
        }
      },
      "CreateShortLinkAPIResponseData": {
        "type": "object",
        "properties": {
          "shortLink": {
            "$ref": "#/components/schemas/ShortLinkData"
          }
        }
      },
      "GetShortLinkAPIResponseData": {
        "type": "object",
        "properties": {
          "shortLink": {
            "$ref": "#/components/schemas/ShortLinkData"
          }
        }
      },
      "Response": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int",
            "example": 0
          },
          "data": {
            "type": "object",
            "properties": {}
          },
          "msg": {
            "type": "string",
            "example": "ok",
            "default": "ok"
          }
        }
      },
      "ShortLinkData": {
        "type": "object",
        "properties": {
          "createTime": {
            "type": "string",
            "description": "创建时间"
          },
          "createdBy": {
            "type": "string",
            "description": "创建者",
            "format": "string",
            "example": "admin"
          },
          "description": {
            "type": "string",
            "description": "描述",
            "format": "string",
            "example": "Jump Jump project"
          },
          "id": {
            "type": "string",
            "format": "string",
            "example": "RANDOM_ID"
          },
          "isEnable": {
            "type": "boolean",
            "description": "是否启用",
            "format": "boolean",
            "example": true
          },
          "updateTime": {
            "type": "string",
            "description": "最后更新时间"
          },
          "url": {
            "type": "string",
            "description": "目标链接",
            "format": "string",
            "example": "https://github.com/jwma/jump-jump"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  }
}