mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-22 19:13:37 +08:00
docs: changed type of query parameter to boolean in the openapi doc
This commit is contained in:
@@ -77,10 +77,10 @@ paths:
|
||||
- name: use_latest_tip
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
type: boolean
|
||||
description: |
|
||||
If use_latest_tip == 1, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == 0 or is unspecified, the tip is selected as usual (first checking value of the
|
||||
If use_latest_tip == true, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
|
||||
tip parameter, otherwise taking the stacks chain tip).
|
||||
/v2/map_entry/{contract_address}/{contract_name}/{map_name}:
|
||||
post:
|
||||
@@ -137,10 +137,10 @@ paths:
|
||||
- name: use_latest_tip
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
type: boolean
|
||||
description: |
|
||||
If use_latest_tip == 1, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == 0 or is unspecified, the tip is selected as usual (first checking value of the
|
||||
If use_latest_tip == true, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
|
||||
tip parameter, otherwise taking the stacks chain tip).
|
||||
x-codegen-request-body-name: key
|
||||
requestBody:
|
||||
@@ -194,9 +194,10 @@ paths:
|
||||
- name: use_latest_tip
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: If use_latest_tip == 1, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == 0 or is unspecified, the tip is selected as usual (first checking value of the
|
||||
type: boolean
|
||||
description: |
|
||||
If use_latest_tip == true, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
|
||||
tip parameter, otherwise taking the stacks chain tip).
|
||||
|
||||
/v2/contracts/call-read/{contract_address}/{contract_name}/{function_name}:
|
||||
@@ -249,10 +250,10 @@ paths:
|
||||
- name: use_latest_tip
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
type: boolean
|
||||
description: |
|
||||
If use_latest_tip == 1, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == 0 or is unspecified, the tip is selected as usual (first checking value of the
|
||||
If use_latest_tip == true, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
|
||||
tip parameter, otherwise taking the stacks chain tip).
|
||||
requestBody:
|
||||
description: map of arguments and the simulated tx-sender where sender is either a Contract identifier or a normal Stacks address, and arguments is an array of hex serialized Clarity values.
|
||||
@@ -299,10 +300,10 @@ paths:
|
||||
- name: use_latest_tip
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
type: boolean
|
||||
description: |
|
||||
If use_latest_tip == 1, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == 0 or is unspecified, the tip is selected as usual (first checking value of the
|
||||
If use_latest_tip == true, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
|
||||
tip parameter, otherwise taking the stacks chain tip).
|
||||
responses:
|
||||
200:
|
||||
@@ -373,10 +374,10 @@ paths:
|
||||
- name: use_latest_tip
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
type: boolean
|
||||
description: |
|
||||
If use_latest_tip == 1, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == 0 or is unspecified, the tip is selected as usual (first checking value of the
|
||||
If use_latest_tip == true, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
|
||||
tip parameter, otherwise taking the stacks chain tip).
|
||||
|
||||
/v2/traits/{contract_address}/{contract_name}/{trait_contract_address}/{trait_ contract_name}/{trait_name}:
|
||||
@@ -434,8 +435,8 @@ paths:
|
||||
- name: use_latest_tip
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
type: boolean
|
||||
description: |
|
||||
If use_latest_tip == 1, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == 0 or is unspecified, the tip is selected as usual (first checking value of the
|
||||
If use_latest_tip == true, the query will be run from the latest tip (includes unconfirmed state).
|
||||
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
|
||||
tip parameter, otherwise taking the stacks chain tip).
|
||||
|
||||
@@ -1681,7 +1681,7 @@ impl HttpRequestType {
|
||||
if let Some(query_string) = query {
|
||||
form_urlencoded::parse(query_string.as_bytes())
|
||||
.find(|(key, _v)| key == "use_latest_tip")
|
||||
.map(|(_k, value)| value == "1")
|
||||
.map(|(_k, value)| value == "1" || value == "true")
|
||||
.unwrap_or(false)
|
||||
} else {
|
||||
false
|
||||
@@ -2502,7 +2502,7 @@ impl HttpRequestType {
|
||||
) -> String {
|
||||
if use_latest_tip {
|
||||
format!(
|
||||
"?use_latest_tip=1{}",
|
||||
"?use_latest_tip=true{}",
|
||||
if with_proof { "" } else { "&proof=0" }
|
||||
)
|
||||
} else if let Some(tip) = tip_opt {
|
||||
|
||||
Reference in New Issue
Block a user