Skip to content

Instantly share code, notes, and snippets.

@pikachu0310
Created September 26, 2023 20:19
Show Gist options
  • Save pikachu0310/def51e9016199892a26887176361f772 to your computer and use it in GitHub Desktop.
Save pikachu0310/def51e9016199892a26887176361f772 to your computer and use it in GitHub Desktop.
gpt-contest-team-pumpkin-openapi.yaml
openapi: "3.0.0"
info:
title: Pumpkin API overview
version: 1.0.0
servers:
- url: https://pumpkin.trap.show/api/v1
paths:
/users:
get:
operationId: getUsers
summary: Get all users
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
tags:
- users
/users/signup:
post:
operationId: userSignUp
summary: Sign up user
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
password:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
id:
type: string
tags:
- users
/users/{userName}:
get:
operationId: getUserName
summary: Get user by userName
parameters:
- in: path
name: userName
schema:
type: string
required: true
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
id:
type: string
name:
type: string
tags:
- users
/users/login:
post:
operationId: userLogin
summary: User login
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
password:
type: string
responses:
'204':
description: Successful operation
tags:
- users
/users/logout:
get:
operationId: userLogout
summary: User logout
responses:
'204':
description: Successful operation
tags:
- users
/me:
get:
operationId: getAuthenticatedUser
summary: Get authenticated user
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
userName:
type: string
userId:
type: string
tags:
- me
/me/ping:
get:
operationId: sessionTest
summary: Test if session is working
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
pong:
type: string
tags:
- me
/gpt/new:
post:
operationId: newGptConversation
summary: Start new GPT conversation
requestBody:
content:
application/json:
schema:
type: object
properties:
type:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
conversationId:
type: string
context:
type: string
tags:
- gpt
/gpt:
post:
operationId: continueGptConversation
summary: Continue GPT conversation
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
type: string
conversationId:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
conversationId:
type: string
context:
type: string
tags:
- gpt
/history:
get:
operationId: getHistory
summary: Get history
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
type: object
properties:
point:
type: integer
createdAt:
type: string
format: date-time
examType:
type: string
conversationId:
type: string
tags:
- history
/conversation/{id}:
get:
operationId: getConversationById
summary: Get conversation by ID
parameters:
- in: path
name: id
schema:
type: string
required: true
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
id:
type: string
createdAt:
type: string
format: date-time
examType:
type: string
content:
type: array
items:
type: object
properties:
number:
type: integer
role:
type: string
content:
type: string
tags:
- conversation
/improved/{id}:
get:
operationId: getImprovedConversationById
summary: Get improved conversation by ID
parameters:
- in: path
name: id
schema:
type: string
required: true
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
type: object
properties:
context:
type: string
conversationId:
type: string
tags:
- improved
tags:
- name: users
description: ユーザーAPI
- name: me
description: マイユーザーAPI
- name: gpt
description: ChatGPT API
- name: history
description: 履歴 API
- name: conversation
description: 会話 API
- name: improved
description: improved API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment