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

Make pydantic data models more modular #237

Merged
merged 4 commits into from
Jan 28, 2022

Conversation

matthiasschaub
Copy link
Collaborator

@matthiasschaub matthiasschaub commented Jan 21, 2022

Description

Pydantic data-models: Make models more modular. Use Union for those models when definining FastAPI request parameters.

FastAPIs swagger interface: Add multiple examples and improve documentation/description of those examples and endpoints in gerneral.

Checklist

  • I have updated my branch to main (e.g. through git rebase main)
  • My code follows the style guide and was checked with pre-commit before committing
  • I have commented my code
  • I have added sufficient unit and integration tests
    • Test for all invalid parameter combination
  • I have updated the CHANGELOG.md

@matthiasschaub
Copy link
Collaborator Author

screenshot1
screenshot2

@matthiasschaub matthiasschaub added the comments welcome Indicates that the creator of this PR is open for early review comments label Jan 21, 2022
@matthiasschaub
Copy link
Collaborator Author

One further improvement would be: Drop down menu with possible parameter values for POST request examples (like the GET request examples).
Here is an issue for this: #238
I would like to tackle this in a separate PR and at another time.

@joker234 joker234 self-requested a review January 24, 2022 09:41
@matthiasschaub matthiasschaub removed the comments welcome Indicates that the creator of this PR is open for early review comments label Jan 24, 2022
bpolys=self.bpolys,
)

def test_invalid_set_of_arguments(self):
Copy link
Member

Choose a reason for hiding this comment

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

maybe we need tests for that test 😜

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would probably be good :D

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 this pull request may close these issues.

None yet

2 participants