Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Access] Update model Block REST API Response #1539

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion openapi/access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ components:
type: object
required:
- header
- _expandable
- block_status
properties:
header:
$ref: '#/components/schemas/BlockHeader'
Expand All @@ -955,6 +955,8 @@ components:
format: uri
_links:
$ref: '#/components/schemas/Links'
block_status:
Copy link
Contributor Author

@UlyanaAndrukhiv UlyanaAndrukhiv Jan 14, 2025

Choose a reason for hiding this comment

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

The block_status field was introduced in flow-go's model_block.go but was missing here. This addition ensures consistency between the two models.

For reference, the commit where block_status was added to flow-go: commit

type: string
BlockHeader:
type: object
required:
Expand Down
5 changes: 4 additions & 1 deletion openapi/go-client-generated/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ components:
- Expired
Block:
required:
- _expandable
- block_status
- header
type: object
properties:
Expand All @@ -1591,7 +1591,10 @@ components:
$ref: '#/components/schemas/Block__expandable'
_links:
$ref: '#/components/schemas/Links'
block_status:
type: string
example:
block_status: block_status
payload:
collection_guarantees:
- collection_id: null
Expand Down
3 changes: 2 additions & 1 deletion openapi/go-client-generated/docs/Block.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Name | Type | Description | Notes
**Header** | [***BlockHeader**](BlockHeader.md) | | [default to null]
**Payload** | [***BlockPayload**](BlockPayload.md) | | [optional] [default to null]
**ExecutionResult** | [***ExecutionResult**](ExecutionResult.md) | | [optional] [default to null]
**Expandable** | [***BlockExpandable**](Block__expandable.md) | | [default to null]
**Expandable** | [***BlockExpandable**](Block__expandable.md) | | [optional] [default to null]
**Links** | [***Links**](Links.md) | | [optional] [default to null]
**BlockStatus** | **string** | | [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

3 changes: 2 additions & 1 deletion openapi/go-client-generated/model_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type Block struct {
Header *BlockHeader `json:"header"`
Payload *BlockPayload `json:"payload,omitempty"`
ExecutionResult *ExecutionResult `json:"execution_result,omitempty"`
Expandable *BlockExpandable `json:"_expandable"`
Expandable *BlockExpandable `json:"_expandable,omitempty"`
Links *Links `json:"_links,omitempty"`
BlockStatus string `json:"block_status"`
}
Loading