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

Blocks Support: Add BlockSchema HTTP client + struct model #172

Closed
parkedwards opened this issue May 23, 2024 · 0 comments · Fixed by #180
Closed

Blocks Support: Add BlockSchema HTTP client + struct model #172

parkedwards opened this issue May 23, 2024 · 0 comments · Fixed by #180
Assignees

Comments

@parkedwards
Copy link
Contributor

parkedwards commented May 23, 2024

https://www.notion.so/prefect/Design-Block-support-in-the-Terraform-Provider-ae2ea25a18864de9b51b8aa06af9486b?pvs=4

In order to create a Block, we need a block_type.id and a block_schema.id. So we'll want an HTTP client for block_schema, so we can fetch one

Things we'll probably need:

  • api.BlockSchema (struct) - in internal/api
  • api.BlockSchemaFilter (struct) - in internal/api -- this is the filter payload on the search request
  • BlockSchemaClient interface{}- in internal/client
  • func (c *BlockSchemaClient) List(ctx context.Context, blockTypeSlugs []string) ([]*api.BlockSchema, error) - in internal/client

https://app.prefect.cloud/api/docs#tag/Block-schemas/operation/read_block_schemas_api_accounts__account_id__workspaces__workspace_id__block_schemas_filter_post

@parkedwards parkedwards changed the title Blocks Support: Add BlockSchema HTTP client + BlockSchema struct model Blocks Support: Add BlockSchema HTTP client + struct model May 23, 2024
@mitchnielsen mitchnielsen self-assigned this May 29, 2024
mitchnielsen added a commit that referenced this issue May 31, 2024
mitchnielsen added a commit that referenced this issue May 31, 2024
Add BlockSchema HTTP client and struct model

Closes #172

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Edward Park <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants