GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - typesense/typesense-api-spec: Contains the API specs for the Typesense HTTP API

BranchesTags
Open more actions menu

Latest commit

 

History

366 Commits
366 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
output
output
 
 
src
src
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc.json
.prettierrc.json
 
 
.redocly.yaml
.redocly.yaml
 
 
README.md
README.md
 
 
bun.lock
bun.lock
 
 
bunfig.toml
bunfig.toml
 
 
config.json
config.json
 
 
eslint.config.mjs
eslint.config.mjs
 
 
openapi.yml
openapi.yml
 
 
package.json
package.json
 
 
tsconfig.build.json
tsconfig.build.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Typesense API Specs

This repository contains the API specs for the Typesense HTTP API.

Some of the client libraries use the specs from this repo to generate types.

Usage

You can use Swagger Editor to view/edit the API spec files.

Clone this repo, and then from the root of this repo, run:

docker run -p 8080:8080 -v $(pwd):/tmp -e SWAGGER_FILE=/tmp/openapi.yml swaggerapi/swagger-editor

Now visit http://localhost:8080 in your browser to view the spec file in your browser.

Once you've made edits, click on File -> Save as YAML. Then copy that file into this repo and rename the file to use a .yml extension.

API extractor

src/ extracts the API's routes and parameters from the highest-versioned stable Typesense release (not GitHub's "latest" flag, which a backport can take) into output/, so openapi.yml only gains what has shipped. RC versions are skipped, set source_branch in config.json to read a branch or tag instead. A nightly workflow opens a pull request when they change, with a report linking each change to its source. Update openapi.yml on that branch, then merge it, even if nothing needed updating: closing it only defers the report to the next run.

The project uses Bun:

bun install --frozen-lockfile
bun test
bun run check
bun run lint

# Extract. A token is optional, but avoids the anonymous GitHub API rate limit.
GITHUB_TOKEN=$(gh auth token) bun src/cli.ts extract --config ./config.json

# After changing the extractor, regenerate output/ from the release it records. Only the
# bot pull request moves output/ to a newer release, so openapi.yml gets reviewed first.
bun src/cli.ts extract --source-branch "$(jq -r .sourceBranch output/typesense_api_spec.json)"

# Compare two extracted specs.
bun src/cli.ts semantic-diff --previous old.json --next new.json --markdown-output diff.md

To also run the integration tests, which extract from real source without using the network, clone Typesense into the gitignored tmp/ folder. They skip without it.

git clone https://github.com/typesense/typesense tmp/typesense

About

Contains the API specs for the Typesense HTTP API

Topics

openapi-spectypesense

Resources

Readme
Activity
Custom properties

Stars

23 stars

Watchers

6 watching

Forks

33 forks
Report repository

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.