-
-
Notifications
You must be signed in to change notification settings - Fork 52
Feat: Implement GET /setup/{id} endpoint #280
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fb34197
Implement GET /setup/{id} endpoint with Pydantic schema
264043d
updating docs and minor improvements
0967c80
updating python api behaviour to return int instead of string
61761f7
Extend nested_remove_nones for empty lists
2e110c8
better performance
86f818f
Fix NaN parsing in _str_to_num and use in migration tests
d9f8bfd
Generalize removal of values to parameter
PGijsbers 1111652
make `values` a required parameter
PGijsbers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| """Pydantic schemas for the setup API endpoints.""" | ||
|
|
||
| from pydantic import BaseModel, ConfigDict | ||
|
|
||
|
|
||
| class SetupParameter(BaseModel): | ||
| """Schema representing an individual parameter within a setup.""" | ||
|
|
||
| id: int | ||
| flow_id: int | ||
| flow_name: str | ||
| full_name: str | ||
| parameter_name: str | ||
| name: str | ||
| data_type: str | None = None | ||
| default_value: str | None = None | ||
| value: str | None = None | ||
|
|
||
| model_config = ConfigDict(from_attributes=True) | ||
|
|
||
|
|
||
| class SetupParameters(BaseModel): | ||
| """Schema representing the grouped properties of a setup and its parameters.""" | ||
|
|
||
| setup_id: int | ||
| flow_id: int | ||
| parameter: list[SetupParameter] | None = None | ||
|
|
||
| model_config = ConfigDict(from_attributes=True) | ||
|
|
||
|
|
||
| class SetupResponse(BaseModel): | ||
| """Schema for the complete response of the GET /setup/{id} endpoint.""" | ||
|
|
||
| setup_parameters: SetupParameters | ||
|
|
||
| model_config = ConfigDict(from_attributes=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.