Add Swagger docs at /docs and /openapi.json with split OpenAPI spec
Made-with: Cursor
This commit is contained in:
60
backend/openapi/index.yaml
Normal file
60
backend/openapi/index.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: LNFaucet API
|
||||
description: |
|
||||
Lightning Network faucet: request small amounts of sats for testing.
|
||||
Auth via NIP-98 (Nostr) or npub-only (limited).
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: http://localhost:3001
|
||||
description: Local development
|
||||
tags:
|
||||
- name: Public
|
||||
description: No authentication required
|
||||
- name: Auth
|
||||
description: NIP-98 or npub login
|
||||
- name: Claim
|
||||
description: Request sats (rate limited)
|
||||
- name: User
|
||||
description: Profile and refresh
|
||||
paths:
|
||||
/health:
|
||||
$ref: './path-items/health.yaml'
|
||||
/config:
|
||||
$ref: './path-items/config.yaml'
|
||||
/stats:
|
||||
$ref: './path-items/stats.yaml'
|
||||
/deposit:
|
||||
$ref: './path-items/deposit.yaml'
|
||||
/deposit/redeem-cashu:
|
||||
$ref: './path-items/deposit-redeem-cashu.yaml'
|
||||
/auth/login:
|
||||
$ref: './path-items/auth-login.yaml'
|
||||
/auth/login-npub:
|
||||
$ref: './path-items/auth-login-npub.yaml'
|
||||
/auth/me:
|
||||
$ref: './path-items/auth-me.yaml'
|
||||
/claim/quote:
|
||||
$ref: './path-items/claim-quote.yaml'
|
||||
/claim/confirm:
|
||||
$ref: './path-items/claim-confirm.yaml'
|
||||
/user/refresh-profile:
|
||||
$ref: './path-items/user-refresh-profile.yaml'
|
||||
components:
|
||||
securitySchemes:
|
||||
$ref: './components/security.yaml'
|
||||
schemas:
|
||||
FaucetConfig:
|
||||
$ref: './components/schemas/faucet.yaml#/FaucetConfig'
|
||||
Stats:
|
||||
$ref: './components/schemas/faucet.yaml#/Stats'
|
||||
DepositInfo:
|
||||
$ref: './components/schemas/faucet.yaml#/DepositInfo'
|
||||
QuoteResult:
|
||||
$ref: './components/schemas/claim.yaml#/QuoteResult'
|
||||
ConfirmResult:
|
||||
$ref: './components/schemas/claim.yaml#/ConfirmResult'
|
||||
UserProfile:
|
||||
$ref: './components/schemas/user.yaml#/UserProfile'
|
||||
ApiError:
|
||||
$ref: './components/schemas/common.yaml#/ApiError'
|
||||
Reference in New Issue
Block a user