-
-
Notifications
You must be signed in to change notification settings - Fork 313
Extend Nest API chapter and project
#2606
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
4904574
2dec113
24b00c1
e883380
a64d657
8e03496
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,8 +38,14 @@ class ChapterDetail(ChapterBase): | |
| """Detail schema for Chapter (used in single item endpoints).""" | ||
|
|
||
| country: str | ||
| leaders: list[str] | ||
| region: str | ||
|
|
||
| @staticmethod | ||
| def resolve_leaders(obj): | ||
| """Resolve leaders.""" | ||
| return obj.leaders_raw | ||
|
||
|
|
||
|
|
||
| class ChapterError(Schema): | ||
| """Chapter error schema.""" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are technically leader names (not leader objects).
I'm not sure how to handle compound objects within API yet (add minimum data + a separate endpoint vs adding all data).
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll update it to
leader_namesfor now. But I think it's wrong to name itleader_names. What do I do?I found Stripe API Docs / Expand interesting.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to implement this, but I can look into it if we go down this path :)