chore(api): update api schema

This commit is contained in:
Reckless_Satoshi
2024-04-21 22:24:05 +01:00
parent f0385f8040
commit 707f76832b

View File

@ -1,7 +1,7 @@
openapi: 3.0.3 openapi: 3.0.3
info: info:
title: RoboSats REST API title: RoboSats REST API
version: 0.5.4 version: 0.6.0
x-logo: x-logo:
url: https://raw.githubusercontent.com/Reckless-Satoshi/robosats/main/frontend/static/assets/images/robosats-0.1.1-banner.png url: https://raw.githubusercontent.com/Reckless-Satoshi/robosats/main/frontend/static/assets/images/robosats-0.1.1-banner.png
backgroundColor: '#FFFFFF' backgroundColor: '#FFFFFF'
@ -1077,6 +1077,7 @@ components:
status: status:
allOf: allOf:
- $ref: '#/components/schemas/StatusEnum' - $ref: '#/components/schemas/StatusEnum'
default: 0
minimum: 0 minimum: 0
maximum: 32767 maximum: 32767
created_at: created_at:
@ -1100,6 +1101,7 @@ components:
nullable: true nullable: true
has_range: has_range:
type: boolean type: boolean
default: false
min_amount: min_amount:
type: string type: string
format: decimal format: decimal
@ -1112,14 +1114,17 @@ components:
nullable: true nullable: true
payment_method: payment_method:
type: string type: string
default: not specified
maxLength: 70 maxLength: 70
is_explicit: is_explicit:
type: boolean type: boolean
default: false
premium: premium:
type: string type: string
format: decimal format: decimal
pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
nullable: true nullable: true
default: '0.00'
satoshis: satoshis:
type: integer type: integer
maximum: 5000000 maximum: 5000000
@ -1135,10 +1140,12 @@ components:
type: integer type: integer
maximum: 28800 maximum: 28800
minimum: 1800 minimum: 1800
default: 10799
bond_size: bond_size:
type: string type: string
format: decimal format: decimal
pattern: ^-?\d{0,2}(?:\.\d{0,2})?$ pattern: ^-?\d{0,2}(?:\.\d{0,2})?$
default: '3.00'
latitude: latitude:
type: string type: string
format: decimal format: decimal
@ -1205,6 +1212,7 @@ components:
format: decimal format: decimal
pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
nullable: true nullable: true
default: '0.00'
satoshis: satoshis:
type: integer type: integer
maximum: 5000000 maximum: 5000000
@ -1214,14 +1222,17 @@ components:
type: integer type: integer
maximum: 86400 maximum: 86400
minimum: 597.6 minimum: 597.6
default: 86399
escrow_duration: escrow_duration:
type: integer type: integer
maximum: 28800 maximum: 28800
minimum: 1800 minimum: 1800
default: 10799
bond_size: bond_size:
type: string type: string
format: decimal format: decimal
pattern: ^-?\d{0,2}(?:\.\d{0,2})?$ pattern: ^-?\d{0,2}(?:\.\d{0,2})?$
default: '3.00'
latitude: latitude:
type: string type: string
format: decimal format: decimal
@ -1261,6 +1272,7 @@ components:
status: status:
allOf: allOf:
- $ref: '#/components/schemas/StatusEnum' - $ref: '#/components/schemas/StatusEnum'
default: 0
minimum: 0 minimum: 0
maximum: 32767 maximum: 32767
created_at: created_at:
@ -1284,6 +1296,7 @@ components:
nullable: true nullable: true
has_range: has_range:
type: boolean type: boolean
default: false
min_amount: min_amount:
type: string type: string
format: decimal format: decimal
@ -1296,9 +1309,11 @@ components:
nullable: true nullable: true
payment_method: payment_method:
type: string type: string
default: not specified
maxLength: 70 maxLength: 70
is_explicit: is_explicit:
type: boolean type: boolean
default: false
premium: premium:
type: string type: string
description: Premium over the CEX price set by the maker description: Premium over the CEX price set by the maker
@ -1324,6 +1339,7 @@ components:
type: integer type: integer
maximum: 28800 maximum: 28800
minimum: 1800 minimum: 1800
default: 10799
total_secs_exp: total_secs_exp:
type: integer type: integer
description: Duration of time (in seconds) to expire, according to the current description: Duration of time (in seconds) to expire, according to the current
@ -1495,10 +1511,12 @@ components:
type: integer type: integer
maximum: 86400 maximum: 86400
minimum: 597.6 minimum: 597.6
default: 86399
bond_size: bond_size:
type: string type: string
format: decimal format: decimal
pattern: ^-?\d{0,2}(?:\.\d{0,2})?$ pattern: ^-?\d{0,2}(?:\.\d{0,2})?$
default: '3.00'
trade_fee_percent: trade_fee_percent:
type: integer type: integer
description: The fee for the trade (fees differ for maker and taker) description: The fee for the trade (fees differ for maker and taker)
@ -1580,6 +1598,7 @@ components:
nullable: true nullable: true
has_range: has_range:
type: boolean type: boolean
default: false
min_amount: min_amount:
type: string type: string
format: decimal format: decimal
@ -1592,14 +1611,17 @@ components:
nullable: true nullable: true
payment_method: payment_method:
type: string type: string
default: not specified
maxLength: 70 maxLength: 70
is_explicit: is_explicit:
type: boolean type: boolean
default: false
premium: premium:
type: string type: string
format: decimal format: decimal
pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
nullable: true nullable: true
default: '0.00'
satoshis: satoshis:
type: integer type: integer
maximum: 5000000 maximum: 5000000
@ -1623,6 +1645,7 @@ components:
type: integer type: integer
maximum: 28800 maximum: 28800
minimum: 1800 minimum: 1800
default: 10799
satoshis_now: satoshis_now:
type: integer type: integer
description: The amount of sats to be traded at the present moment (not description: The amount of sats to be traded at the present moment (not
@ -1631,6 +1654,7 @@ components:
type: string type: string
format: decimal format: decimal
pattern: ^-?\d{0,2}(?:\.\d{0,2})?$ pattern: ^-?\d{0,2}(?:\.\d{0,2})?$
default: '3.00'
latitude: latitude:
type: string type: string
format: decimal format: decimal
@ -1867,6 +1891,7 @@ components:
fee: fee:
type: string type: string
format: decimal format: decimal
default: '0.0000'
TypeEnum: TypeEnum:
enum: enum:
- 0 - 0