Skip to content

Harden model factory handling of optional PrintNode fields #21

@cbusillo

Description

@cbusillo

Problem

ModelFactory still assumes some nested PrintNode response keys always exist. Examples include create_computer expecting jre / inet_6, and create_printer expecting nested computer / capabilities keys. Current tests pin the happy-path behavior, but API payloads can drift or omit optional fields.

Suggested work

  • Add credential-free regression tests for missing optional fields and null nested values.
  • Decide which omissions should be accepted with defaults versus rejected clearly.
  • Prefer small compatibility-preserving changes over a broad model redesign.
  • Update CHANGELOG.md for any behavior users may notice.

Verification

Run uv run pytest and, if model behavior changes, include a clean wheel build/Twine check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions