Import Pydantic models
Apiome now imports Pydantic models — the data layer of most FastAPI services — into the catalog, with their validation rules. What gets imported.
- Read, never run. The Python source is parsed as text; your module is never imported, so its top-level code never executes.
- Constraints come with them.
Field(gt, le, max_length, pattern …)andAnnotatedconstraints land on each field, along with defaults, descriptions and formats fordatetime,UUID,EmailStrand more. - Models as you wrote them. Inheritance, generic models, enums,
Optionaland unions, nested and self-referencing models, and aliases (includingto_camel). - Declared, not guessed. Models built with
create_model, validators and computed fields are listed in the coverage ledger.
