Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update openapi description #307

Merged
merged 5 commits into from
Feb 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/api/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,24 @@ export const OpenApiSchemaOptions: SwaggerOptions = {
openapi: {
info: {
title: 'Ordinals API',
description:
'A service that indexes Bitcoin Ordinals data and exposes it via REST API endpoints.',
description: `
The [Ordinals API](https://docs.hiro.so/ordinals-api) is a service that indexes Bitcoin Ordinals data and exposes it via REST API endpoints.

Here are the key features of the Ordinals API:

- **Ordinal Inscription Ingestion**: The Ordinals API helps with the complete ingestion of ordinal inscriptions. Using our endpoints, you can retrieve the metadata for a particular inscription, all inscriptions held by a particular address, trading activity for inscriptions, and more.

- **BRC-20 Support**: The Ordinals API also offers support for BRC-20 tokens, a fungible token standard built on top of ordinal theory. Retrieve data for a particular BRC-20 token, a user's BRC-20 holdings, marketplace activity, and more.

- **REST JSON Endpoints with ETag Caching**: The Ordinals API provides easy-to-use REST endpoints that return responses in JSON format. It also supports ETag caching, which allows you to cache responses based on inscriptions. This helps optimize performance and reduce unnecessary requests.

- **Auto-Scale Server Configurations**: The Ordinals API supports three run modes based on the RUN_MODE environment variable:
ryanwaits marked this conversation as resolved.
Show resolved Hide resolved
- \`default\`: This mode runs all background jobs and the API server. It is suitable for running a single instance of the API.
ryanwaits marked this conversation as resolved.
Show resolved Hide resolved
- \`readonly\`: Only the API server runs in this mode. It is designed for auto-scaled clusters with multiple \`readonly\` instances and a single \`writeonly\` instance. The \`writeonly\` instance is responsible for populating the database.
ryanwaits marked this conversation as resolved.
Show resolved Hide resolved
- \`writeonly\`: This mode is used in an auto-scaled environment to consume new inscriptions and push that data to a database. It works in conjunction with multiple \`readonly\` instances.
ryanwaits marked this conversation as resolved.
Show resolved Hide resolved
ryanwaits marked this conversation as resolved.
Show resolved Hide resolved

The source code for this project is available in our [GitHub repository](https://github.com/hirosystems/ordinals-api). You can explore the codebase, contribute, and raise issues or pull requests.
`,
version: SERVER_VERSION.tag,
},
externalDocs: {
Expand Down
Loading