Skip to content

Commit

Permalink
docs: add parameters to hyperchain spec
Browse files Browse the repository at this point in the history
  • Loading branch information
yaboiishere committed Dec 13, 2024
1 parent 7c25970 commit ea03401
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/swagger_v3/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ components:
schema:
type: string
pattern: '(gen):\d+(-\d+)?'
HyperchainScopeParam:
in: query
name: scope
description: 'Scopes results in a hyperchain epoch range'
schema:
type: string
pattern: '(epoch):\d+(-\d+)?'
DirectionParam:
in: query
name: direction
Expand Down
42 changes: 42 additions & 0 deletions docs/swagger_v3/hyperchain.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ paths:
operationId: GetEpochs
parameters:
- $ref: '#/components/parameters/DirectionParam'
- $ref: '#/components/parameters/LimitParam'
- $ref: '#/components/parameters/HyperchainScopeParam'
responses:
'200':
description: Returns paginated list of information about Epochs
Expand Down Expand Up @@ -170,6 +172,10 @@ paths:
deprecated: false
description: Get Validators information
operationId: GetValidators
parameters:
- $ref: '#/components/parameters/DirectionParam'
- $ref: '#/components/parameters/LimitParam'
- $ref: '#/components/parameters/HyperchainScopeParam'
responses:
'200':
description: Returns validator information
Expand Down Expand Up @@ -197,6 +203,13 @@ paths:
deprecated: false
description: Get Validator information
operationId: GetValidator
parameters:
- name: validator
in: path
description: Validator address
required: true
schema:
$ref: '#/components/schemas/AccountAddress'
responses:
'200':
description: Returns validator information
Expand All @@ -215,6 +228,16 @@ paths:
deprecated: false
description: Get Delegates information for validator
operationId: GetValidatorDelegates
parameters:
- name: validator
in: path
description: Validator address
required: true
schema:
$ref: '#/components/schemas/AccountAddress'
- $ref: '#/components/parameters/DirectionParam'
- $ref: '#/components/parameters/LimitParam'
- $ref: '#/components/parameters/HyperchainScopeParam'
responses:
'200':
description: Returns delegates information
Expand Down Expand Up @@ -242,6 +265,16 @@ paths:
deprecated: false
description: Get top Delegates information for validator
operationId: GetTopValidatorDelegates
parameters:
- name: validator
in: path
description: Validator address
required: true
schema:
$ref: '#/components/schemas/AccountAddress'
- $ref: '#/components/parameters/DirectionParam'
- $ref: '#/components/parameters/LimitParam'
- $ref: '#/components/parameters/HyperchainScopeParam'
responses:
'200':
description: Returns top validator delegates information
Expand Down Expand Up @@ -271,6 +304,8 @@ paths:
operationId: GetSchedules
parameters:
- $ref: '#/components/parameters/DirectionParam'
- $ref: '#/components/parameters/LimitParam'
- $ref: '#/components/parameters/HyperchainScopeParam'
responses:
'200':
description: Returns schedule information
Expand Down Expand Up @@ -298,6 +333,13 @@ paths:
deprecated: false
description: Get Schedule information
operationId: GetSchedule
parameters:
- name: height
in: path
description: Schedule height
required: true
schema:
type: integer
responses:
'200':
description: Returns schedule information
Expand Down

0 comments on commit ea03401

Please sign in to comment.