Commit Graph

4 Commits

Author SHA1 Message Date
f15a2c53d6 Add comprehensive RustDocs for all public API items
- Add crate-level docs with usage examples for lib.rs
- Document OllamaClient, OllamaClientBuilder, and all public methods
- Document error module with OllamaError variants and OllamaResult
- Document types module with endpoint mapping table
- Document all types in common, chat, generate, ps, pull, tags, version
- Add doc examples for builders, constructors, and key types
- All 26 doc-tests pass
2026-01-30 20:16:15 +00:00
385ff9b3a2 Add unit tests for all types and error handling
54 tests covering serialization/deserialization round-trips, builder
patterns, skip_serializing_if behavior, untagged enums, field renames,
and error type conversions.

Test modules added to:
- types/common.rs: Think, Stop, Options, OptionsBuilder, ModelDetails
- types/generate.rs: GenerateRequest, GenerateResponse, builder
- types/chat.rs: Role, Message, ChatRequest, Tool, ChatResponse
- types/pull.rs: PullRequest, PullResponse, builder
- types/version.rs: VersionResponse
- types/tags.rs: TagsResponse
- types/ps.rs: PsResponse
- error.rs: Display formatting, From conversions, Error trait
2026-01-30 19:50:59 +00:00
c567f935f6 Add skip_serializing_if to PullRequest optional fields
PullRequest now omits insecure and stream from serialized JSON when
unset, consistent with all other request types in the codebase.
Previously these fields serialized as null.
2026-01-30 19:33:30 +00:00
ac480881e4 Adds pull method and example 2025-12-28 12:18:35 +00:00