Skip to content

v1.0.1 — Critical bug fix release

Choose a tag to compare

@azaharizaman azaharizaman released this 30 Jun 19:03
4bf05d3

v1.0.1 — Critical bug fix release

Patch release addressing three critical user-reported bugs that caused
silent data loss or misleading errors. No public API surface change.
No core dependencies changed. The wheel artifact
(paxman-1.0.1-py3-none-any.whl) is bit-for-bit compatible with
1.0.0 except for the three code paths below.

Critical bugs fixed

  • #52 — JSON Schema dict
    inputs were silently mis-routed to the Dict DSL adapter. _detect_format()
    now uses a structural marker heuristic (per
    ADR-0011)
    to route dicts with JSON Schema keywords ($schema, $defs,
    properties, etc.) to the JSON Schema adapter, and OpenAPI documents
    (with the openapi top-level key) to the OpenAPI adapter. Dict DSL
    dicts (with id and fields) still route to the Dict DSL adapter.

  • #56 — OpenAPI 3.0
    nullable: true was silently dropped. The OpenAPI adapter now
    translates the 3.0 nullable: true keyword to the 3.1
    type: [type, "null"] form before delegating to the JSON Schema
    adapter. Idempotent for already-3.1-style list types.

  • #57 — Pydantic nested
    BaseModel fields raised UNSUPPORTED_FIELD_TYPE.
    _python_type_to_field_type() now maps a direct nested BaseModel
    annotation to FieldType.OBJECT, matching the adapter's existing
    docstring. list[BaseModel] still maps to ARRAY.

Documentation fixes

  • #54normalize()
    docstring example replaced. The previous example used a JSON Schema
    dict that was silently mis-routed (issue #52) and produced
    Status.INVALID_CONTRACT. The new example uses a valid JSON Schema
    document and produces Status.PARTIAL_SUCCESS (the honest result
    for a row-text invoice with no V1 capabilities registered).

  • #55replay()
    docstring example replaced. The previous example used an empty
    properties: {} that the JSON Schema adapter rejects. The new
    example uses a valid non-empty document and is marked
    # doctest: +SKIP.

Infrastructure

  • New
    ADR-0011:
    Format Auto-Detection for JSON Schema Dicts. Documents the marker
    heuristic and the rationale.
  • Version bump 1.0.01.0.1 in pyproject.toml and
    src/paxman/versioning.py.
  • Changelog: docs/operations/changelog.md now has a [1.0.1] section
    with the full fix list.
  • Golden artifacts: 8 fixture JSON files regenerated via
    scripts/bootstrap_golden_artifacts.py to reflect the new
    paxman_version and the fixed behavior.
  • 13 new tests added (8 for the JSON Schema detection, 5 for the
    OpenAPI nullable translation, 2 for the Pydantic BaseModel mapping).
    Total: 2352 → 2365 tests passing.

Test surface

  • mypy --strict: passes (77 source files)
  • ruff check: passes
  • ruff format --check: passes
  • pytest: 2365 tests pass

Install

```bash
pip install paxman==1.0.1
```

Issues closed