Repository navigation
Specbook 0.6.1: optional fields in OpenAPI 3.1
A fix for specs that mark optional fields the OpenAPI 3.1 way, which is how FastAPI and Pydantic v2 write every Optional field.
Fixes
- No false "differences from spec" on optional fields. A field written as
anyOf: [{ type: integer }, { type: 'null' }]lost itsnullbranch, so a response with"owner_id": nullwas flagged as "expected integer, got null". It now matches. This affects the viewer, the play panel and the portal.
Also
specbook-fastapi0.1.0 is out on PyPI, as a separate package:pip install specbook-fastapiserves the viewer from a FastAPI app. See Use with FastAPI.- The README's example instructions no longer run
specbook generatebeforespecbook dev, sincedevgenerates what it needs.
Full changelog: v0.6.0...v0.6.1