Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cde6e63
correct some OpenAPI schema validations and response types
simone-stacks Dec 4, 2025
1bc0a97
add principal/contract-address schemas and fix type constraints
simone-stacks Dec 11, 2025
66f1356
remove unused example files
simone-stacks Dec 11, 2025
1d4ee1a
keep redocly happy
simone-stacks Dec 11, 2025
031804a
create principals schemas and re-add tip pattern and maxLength
simone-stacks Dec 11, 2025
8206dcc
improve OpenAPI schemas with u32 range constraints
simone-stacks Dec 11, 2025
19b0984
implement proper 405/400/404 HTTP error responses with Allow header
simone-stacks Dec 11, 2025
e1a3b9c
keep linters happy
simone-stacks Dec 11, 2025
84b11cb
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Dec 12, 2025
f4c3dec
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Dec 15, 2025
d93faa6
add SM and SN in the principal patterns
simone-stacks Dec 15, 2025
3c98ef9
add current_epoch as a required field
simone-stacks Dec 15, 2025
c797975
add SM SN examples and enforce even-length hex patterns
simone-stacks Dec 15, 2025
5b299a7
auto-generate permissive regexes, add structured 405 error type
simone-stacks Dec 16, 2025
91c9ad5
update openapi removing 0x and adding 400 for some endpoints
simone-stacks Dec 16, 2025
5bff836
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Dec 17, 2025
9764af8
update docs/rpc/openapi.yaml
simone-stacks Dec 18, 2025
8126e8c
update stackslib/src/net/httpcore.rs
simone-stacks Dec 18, 2025
efb8fc8
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Dec 18, 2025
ebca11f
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Dec 22, 2025
97db1bb
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Jan 5, 2026
e5f701e
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Jan 6, 2026
bce747a
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Jan 7, 2026
1801b7c
Merge branch 'develop' into chore/openapi-and-405-returns
simone-stacks Jan 14, 2026
b06eb08
rename contract_address to deployer_address in docs
simone-stacks Jan 14, 2026
84d7624
add HTTP 405 coverage and error response routing tests
simone-stacks Jan 14, 2026
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

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions docs/rpc/components/examples/pox-info.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"pox_activation_threshold_ustx": 52329761604388,
"first_burnchain_block_height": 666050,
"current_burnchain_block_height": 812345,
"current_epoch": "Epoch33",
"prepare_phase_block_length": 100,
"reward_phase_block_length": 2000,
"reward_slots": 4000,
Expand Down

This file was deleted.

9 changes: 3 additions & 6 deletions docs/rpc/components/parameters/contract-address.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Deployer address for contract endpoints (standard principal format)
name: contract_address
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're making changes, maybe we could rename this to deployer_address. contract_address sounds like it should include the contract name, so the fact that it is just the deployer address is a bit surprising.

Copy link
Contributor Author

@simone-stacks simone-stacks Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b06eb08, I also changed some comments in docs/event-dispatcher.md - Is this ok?

in: path
required: true
description: |
Standard Stacks address (e.g. `SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0`).
Must be 28-41 characters long using Stacks base58check format.
Must be 28-41 characters long using Stacks c32check format.
schema:
type: string
pattern: "^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41}$"
minLength: 28
maxLength: 41
example: SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0
$ref: '../schemas/standard-principal.schema.yaml'
6 changes: 1 addition & 5 deletions docs/rpc/components/parameters/principal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ description: |
(e.g. `SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info`).
Contract names have a maximum length of 40 characters for new contracts. Legacy contracts may have names up to 128 characters.
schema:
type: string
pattern: "^([0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41})|([0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41}\\.[a-zA-Z]([a-zA-Z0-9]|[-_]){0,127})$"
minLength: 28
maxLength: 170
example: SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info
$ref: '../schemas/principal.schema.yaml'
8 changes: 8 additions & 0 deletions docs/rpc/components/parameters/standard-principal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: principal
in: path
required: true
description: |
Standard Stacks address (standard principal, not contract principal).
Must be 28-41 characters long using Stacks c32check format.
schema:
$ref: '../schemas/standard-principal.schema.yaml'
4 changes: 2 additions & 2 deletions docs/rpc/components/schemas/clarity-data.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ properties:
pattern: "^0x[0-9a-f]+$"
proof:
type: string
description: Hex-encoded 0x prefixed string of the Merkle proof for the data
pattern: "^0x[0-9a-f]+$"
description: Hex-encoded 0x prefixed string of the Merkle proof for the data. Empty string if proof not requested.
pattern: "^(0x[0-9a-f]+)?$"
7 changes: 6 additions & 1 deletion docs/rpc/components/schemas/clarity-name.schema.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
type: string
pattern: "^([a-zA-Z0-9_]|[-!?+<>=/*]){1,128}$"
description: |
A valid Clarity name. Must either:
- Start with a letter and contain only letters, numbers, and [-_!?+<>=/*]
- Be exactly one of the special characters: - + = * /
- Be a comparison operator: < > <= >=
pattern: "^[a-zA-Z]([a-zA-Z0-9]|[-_!?+<>=/*])*$|^[-+=/*]$|^[<>]=?$"
minLength: 1
maxLength: 128
1 change: 0 additions & 1 deletion docs/rpc/components/schemas/pox-info.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ properties:
Any eligible stacks must be stacked before this block.
blocks_until_prepare_phase:
type: integer
minimum: 0
description:
The number of burn blocks until the prepare phase for this cycle
starts. If the prepare phase for this cycle already started, this value
Expand Down
11 changes: 11 additions & 0 deletions docs/rpc/components/schemas/principal.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Standard principal or contract principal (address.contract-name)
type: string
pattern: "^S[PTMN][0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26,39}(\\.[a-zA-Z]([a-zA-Z0-9]|[-_]){0,127})?$"
minLength: 28
maxLength: 170
examples:
- SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0
- SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info
- ST000000000000000000002AMW42H
- SM2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKQVX8X0G
- SN2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKP6D2ZK9
13 changes: 9 additions & 4 deletions docs/rpc/components/schemas/read-only-function-args.schema.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
description: Describes representation of a Type-0 Stacks 2.0 transaction. https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md#type-0-transferring-an-asset
type: object
additionalProperties: false
required:
- sender
- arguments
properties:
sender:
type: string
description: The simulated tx-sender
description: The simulated tx-sender.
allOf:
- $ref: './standard-principal.schema.yaml'
sponsor:
type: string
description: The simulated sponsor address
description: The simulated sponsor address.
allOf:
- $ref: './principal.schema.yaml'
arguments:
type: array
description: An array of hex serialized Clarity values
items:
type: string
pattern: "^(0x)?([0-9a-fA-F]{2})+$"
description: Hex-encoded Clarity value (optionally prefixed with 0x)
10 changes: 6 additions & 4 deletions docs/rpc/components/schemas/stackerdb-chunk-data.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ properties:
slot_id:
type: integer
minimum: 0
description: Slot identifier
maximum: 4294967295
description: Slot identifier (u32 range)
slot_version:
type: integer
minimum: 0
description: Slot version (lamport clock)
maximum: 4294967295
description: Slot version (lamport clock, u32 range)
sig:
type: string
description: Hex-encoded signature from the stacker
pattern: "^[0-9a-f]{130}$"
data:
type: string
description: Hex-encoded chunk data
pattern: "^[0-9a-f]*$"
description: Hex-encoded chunk data (must be even length)
pattern: "^([0-9a-f]{2})*$"
10 changes: 10 additions & 0 deletions docs/rpc/components/schemas/standard-principal.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Standard principal only, no contract suffix
type: string
pattern: "^S[PTMN][0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26,39}$"
minLength: 28
maxLength: 41
examples:
- SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0
- ST000000000000000000002AMW42H
- SM2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKQVX8X0G
- SN2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKP6D2ZK9
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ type: object
required:
- error
- reason
- reason_data
- txid
properties:
error:
Expand Down
Loading