Skip to content

Add parent_id to NodeChild and regenerate full Python client output#7

Merged
skullydazed merged 3 commits into
mainfrom
copilot/add-parent-id-to-nodechild
May 31, 2026
Merged

Add parent_id to NodeChild and regenerate full Python client output#7
skullydazed merged 3 commits into
mainfrom
copilot/add-parent-id-to-nodechild

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

NodeChild responses needed to expose parent_id so list/children payloads carry hierarchy without extra lookups. This update also brings the committed binctl-client back in sync with openapi.yaml by including the full generator output.

  • API schema

    • Added nullable parent_id: string to NodeChild in openapi.yaml.
  • Backend response shape

    • Updated node/children query paths to select parent_id.
    • Extended row-to-dict serialization to emit parent_id when available in result rows.
  • Generated Python client (full regen output)

    • Regenerated client artifacts from schema updates.
    • NodeChild model now has typed parent_id.
    • Included all generated additions from this regen pass (including config endpoint/client model exports), rather than trimming generated files.
  • Tests

    • Added/updated API node tests to assert parent_id in node list items and child payloads.
@_attrs_define
class NodeChild:
    id: str
    label: str
    is_container: bool
    created_at: datetime.datetime
    updated_at: datetime.datetime
    description: None | str | Unset = UNSET
    parent_id: None | str | Unset = UNSET

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds parent_id to NodeChild responses so list items and child arrays can expose hierarchy information without extra lookups.

Changes:

  • Extends NodeChild in openapi.yaml with nullable parent_id.
  • Includes parent_id in child/list SQL queries and serializes it when present.
  • Adds tests covering parent_id in node children and node list responses.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
openapi.yaml Documents parent_id on NodeChild.
db/flask.py Selects and serializes parent_id for list and child node rows.
tests/test_api_nodes.py Verifies list and children payloads include expected parent_id values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread openapi.yaml
Comment on lines +430 to +432
parent_id:
type: string
nullable: true
@skullydazed

Copy link
Copy Markdown
Contributor

@copilot you forgot to regenerate the client

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

@copilot you forgot to regenerate the client

Addressed in 94381f6.

Copilot AI changed the title Add parent_id to NodeChild Add parent_id to NodeChild and regenerate full Python client output May 31, 2026
@skullydazed skullydazed merged commit d0bb740 into main May 31, 2026
1 check passed
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.

3 participants