openapi: "3.0.4"
info:
title: ragithub
description: backend for ragithub
version: 0.4.0
paths:
/{user}/{repo}/index/:
get:
operationId: GetIndex
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
responses:
'200':
description: content of `index.json` file of the repository.
content:
application/json:
schema:
type: object
/{user}/{repo}/config/{config}:
get:
operationId: GetConfig
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
- name: config
in: path
required: true
description: name of the config file (api, build or query)
schema:
type: string
responses:
'200':
description: content of the config file.
content:
application/json:
schema:
type: object
/{user}/{repo}/prompt/{prompt}:
get:
operationId: GetPrompt
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
- name: prompt
in: path
required: true
description: name of the prompt file (a file in `.ragit/prompts`, without an extension)
schema:
type: string
responses:
'200':
description: content of the prompt file.
content:
text/plain:
schema:
type: string
/{user}/{repo}/uid:
get:
operationId: GetRepoUid
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
responses:
'200':
description: uid of the repository
content:
text/plain:
schema:
type: string
description: uid of the repository
/{user}/{repo}/chunk-count:
get:
operationId: GetChunkCount
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
responses:
'200':
description: number of chunks in the repository
content:
application/json:
schema:
type: integer
format: int64
/{user}/{repo}/chunk-list/{chunk-prefix}:
get:
operationId: GetChunkList
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
- name: chunk-prefix
in: path
required: true
description: first 2 characters of the uid of the chunk
schema:
type: string
responses:
'200':
description: a list of chunk uids that