Add Swagger docs at /docs and /openapi.json with split OpenAPI spec
Made-with: Cursor
This commit is contained in:
24
backend/openapi/components/schemas/claim.yaml
Normal file
24
backend/openapi/components/schemas/claim.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
QuoteResult:
|
||||
type: object
|
||||
properties:
|
||||
quote_id:
|
||||
type: string
|
||||
payout_sats:
|
||||
type: integer
|
||||
expires_at:
|
||||
type: integer
|
||||
ConfirmResult:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
already_consumed:
|
||||
type: boolean
|
||||
payout_sats:
|
||||
type: integer
|
||||
next_eligible_at:
|
||||
type: integer
|
||||
message:
|
||||
type: string
|
||||
payment_hash:
|
||||
type: string
|
||||
12
backend/openapi/components/schemas/common.yaml
Normal file
12
backend/openapi/components/schemas/common.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
ApiError:
|
||||
type: object
|
||||
required: [code, message]
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
details:
|
||||
type: string
|
||||
next_eligible_at:
|
||||
type: integer
|
||||
64
backend/openapi/components/schemas/faucet.yaml
Normal file
64
backend/openapi/components/schemas/faucet.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
FaucetConfig:
|
||||
type: object
|
||||
properties:
|
||||
faucetEnabled:
|
||||
type: boolean
|
||||
emergencyStop:
|
||||
type: boolean
|
||||
cooldownDays:
|
||||
type: integer
|
||||
minAccountAgeDays:
|
||||
type: integer
|
||||
minActivityScore:
|
||||
type: integer
|
||||
faucetMinSats:
|
||||
type: integer
|
||||
faucetMaxSats:
|
||||
type: integer
|
||||
Stats:
|
||||
type: object
|
||||
properties:
|
||||
balanceSats:
|
||||
type: integer
|
||||
totalPaidSats:
|
||||
type: integer
|
||||
totalClaims:
|
||||
type: integer
|
||||
claimsLast24h:
|
||||
type: integer
|
||||
dailyBudgetSats:
|
||||
type: integer
|
||||
spentTodaySats:
|
||||
type: integer
|
||||
recentPayouts:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pubkey_prefix:
|
||||
type: string
|
||||
payout_sats:
|
||||
type: integer
|
||||
claimed_at:
|
||||
type: integer
|
||||
recentDeposits:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
amount_sats:
|
||||
type: integer
|
||||
source:
|
||||
type: string
|
||||
enum: [lightning, cashu]
|
||||
created_at:
|
||||
type: integer
|
||||
DepositInfo:
|
||||
type: object
|
||||
properties:
|
||||
lightningAddress:
|
||||
type: string
|
||||
nullable: true
|
||||
lnurlp:
|
||||
type: string
|
||||
nullable: true
|
||||
9
backend/openapi/components/schemas/user.yaml
Normal file
9
backend/openapi/components/schemas/user.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
UserProfile:
|
||||
type: object
|
||||
properties:
|
||||
lightning_address:
|
||||
type: string
|
||||
nullable: true
|
||||
name:
|
||||
type: string
|
||||
nullable: true
|
||||
9
backend/openapi/components/security.yaml
Normal file
9
backend/openapi/components/security.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
NIP98:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: Nostr
|
||||
description: NIP-98 HTTP Auth (Authorization Nostr <base64(json)>)
|
||||
BearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
Reference in New Issue
Block a user