Skip to content

Ensure the repository functions return the right types#273

Merged
TessFerrandez merged 2 commits into
developfrom
tessferrandez/type-repositories
Jun 15, 2021
Merged

Ensure the repository functions return the right types#273
TessFerrandez merged 2 commits into
developfrom
tessferrandez/type-repositories

Conversation

@TessFerrandez
Copy link
Copy Markdown
Member

@TessFerrandez TessFerrandez commented Jun 15, 2021

What is being addressed

Currently the repository functions return dictionaries when they say they return Workspace or ResourceTemplate objects. This PR casts them to the expected return type so that we get validation exceptions at the repository level if the data coming back from the db is malformed. (So that those errors are catchable later)

How is this addressed

  • Cast return types in the repository classes appropriately
  • Update related tests

This is a prerequisite for #213

@TessFerrandez TessFerrandez added the api Composition Service API label Jun 15, 2021
@TessFerrandez TessFerrandez self-assigned this Jun 15, 2021
@github-actions
Copy link
Copy Markdown

Unit Test Results

  1 files    1 suites   2s ⏱️
44 tests 44 ✔️ 0 💤 0 ❌

Results for commit b656f4d.

Copy link
Copy Markdown
Member

@tompaana tompaana left a comment

Choose a reason for hiding this comment

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

LGTM AFAICS

@TessFerrandez TessFerrandez merged commit 5981dae into develop Jun 15, 2021
@TessFerrandez TessFerrandez deleted the tessferrandez/type-repositories branch June 15, 2021 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Composition Service API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants