Releases: FastComments/fastcomments-rust
Releases · FastComments/fastcomments-rust
Release 1.3.0
- Add response content-type detection and handling: introduce a ContentType enum and inspect the response content-type header in API clients to choose parsing behavior (JSON, text/plain, or unsupported) and return clearer errors when a non-JSON content type cannot be converted to the expected model.
- Update many API methods (default_api and public_api) to branch parsing based on ContentType (ContentType::Json, ContentType::Text, ContentType::Unsupported) and produce descriptive error messages for text/plain or unknown content types.
- Add ContentType enum implementation to client::apis::mod and import it where needed in API modules.
- Implement streaming file uploads in public_api::upload_image using tokio::fs::File and tokio_util::codec::FramedRead/BytesCodec; send multipart file parts from a Tokio file stream so large files are streamed rather than loaded fully into memory.
- Update HTTP client features/dependencies: enable reqwest stream feature; enable tokio fs feature; add tokio-util dependency (Cargo.toml) and update Cargo.lock (tokio-util, futures-io, futures-macro, wasm-streams, and other resolved deps).
- Replace the old VoteResponseStatus model with a new Status enum in the VoteResponse model (add Status enum with variants success, failed, pending-verification and a Default impl) and remove the vote_response_status module; update models mod.rs and vote_response.rs accordingly.
- Adjust code imports: add serde::de::Error as _ where necessary and include ContentType in API modules' use lists.
- Update public_api implementation to use multipart streaming for file uploads (construct multipart::Part from a wrapped stream and attach file name when available).
- Remove vote_response_status from the generated file list and delete its docs entry and model file references.
- Various generated client documentation and model doc fixes: rename and normalize model doc filenames and references (e.g., use CamelCase file names like AggregationRequestSort.md / AggregationRequestSort, QuestionConfigCustomOptionsInner -> QuestionConfigCustomOptionsInner.md links), update inline type representations (replace linked markdown references for serde_json::Value and std::collections::HashMap with direct inline type formatting), and correct/refine many field types in docs to refer to specific enum types (e.g., VoteDir, Dir, Operator, CrudType, From, PermanentFlag, Type, Actions, Note, Code, SortDirections, SizePreset) where applicable.
- Update numerous docs to fix link targets and type names (examples: FComment_meta -> FCommentMeta references in docs, Record_string... -> RecordString... filenames, various API and model markdown references corrected).
- Miscellaneous: small code cleanups and consistent error handling for response parsing across many endpoints; update client/.openapi-generator/FILES to reflect removed/renamed files.
Release 1.2.0
Fixes vote response objects to be properly typed.
Release 1.1.0
Adds: email-templates, hash-tags, moderators, notification-count, notifications, pending-webhook-events, question-config, question-results, tenant-daily-usage, tenant-packages, tenants, tenant-users, users, votes
Release 1.0.0
- BREAKING: Replace legacy ImportedAPIStatus.* types with models::ApiStatus across the SDK and OpenAPI schema (many response models, API docs and function signatures updated).
- BREAKING: Remove many generated Pick_* / Pick... types and replace with concrete models (ApiComment, ApiCommentBase, PublicCommentBase, PubSubCommentBase, APICommentBase, DeletedCommentResultComment, SetCommentTextResult, UpdatableCommentParams). Consumers must migrate usages of removed pick-types to the new model types.
- BREAKING: Rename/replace vote and delete status wrapper types: VoteDeleteResponse.status is now models::ApiStatus (was Boxmodels::VoteDeleteResponseStatus), and related status model VoteDeleteResponseStatus deleted.
- BREAKING: Update DefaultApi.update_comment signature and request body: UpdateCommentParams.body (PickApiCommentPeriodUpdatableCommentFields) -> UpdateCommentParams.updatable_comment_params: models::UpdatableCommentParams. The request JSON now uses updatable_comment_params.
- BREAKING: Change FComment.logs type from generic Vec<Vec<serde_json::Value>> to Vecmodels::CommentLogEntry and replace CommentLog representation. Update related docs and OpenAPI schema.
- NEW: Add ApiAuditLog model (src/docs and src/models) and replace previous PickTenantAuditLogPeriodTenantAuditLogKeys references with ApiAuditLog in GetAuditLogs responses and docs.
- NEW: Add ApiComment and ApiCommentBase models (detailed comment representations) and replace previous PickFCommentPeriodApiCommentFieldsKeys usages with ApiComment across API responses (GetComment, GetComments, SaveComment responses, etc.).
- NEW: Add ApiCommentBase model file and corresponding docs.
- NEW: Add CommentLogData, CommentLogEntry and CommentLogType models and docs to represent structured comment log entries and their data.
- NEW: Add DeletedCommentResultComment model and docs; replace previous pick type for deleted comment result in DeleteCommentPublic/PublicApiDeleteComment responses.
- NEW: Add PubSubCommentBase model and docs; update PubSubComment model to use new fields/order/nullable handling and adjust OpenAPI representation.
- NEW: Add PublicCommentBase model and docs; update PublicComment model to use nullable/double-option fields and reorder fields; Add approved field and other optional fields.
- NEW: Add SetCommentTextResult model (renamed from PickFCommentPeriodApprovedOrCommentHtml) and update PublicApiSetCommentTextResponse and SetCommentText200Response to use SetCommentTextResult.
- NEW: Add UpdatableCommentParams model and docs (replaces PickApiCommentPeriodUpdatableCommentFields) and update API documentation and request handling to accept it.
- NEW: Add RepeatCommentCheckIgnoredReason and RepeatCommentHandlingAction enums (replacing previously imported status enums) and corresponding docs.
- NEW: Add PubSubCommentBase and PublicCommentBase to models::mod and export them for SDK consumers.
- NEW: Add ApiCreateUserBadgeResponse.notes optional field (docs and models) to include notes in responses related to creating user badges.
- NEW: Add PatchPageApiResponse.comments_updated field (docs and models) to report number of comments updated by patching a page.
- NEW: Add many model fields with improved optional/null handling (use of serde_with double_option and Option<Option>) to better reflect nullable properties in OpenAPI (e.g., ApiAuditLog.url/ip, APIComment and related models, PubSubComment fields, etc.).
- CHANGED: Numerous models updated to use Option<Option> and serde_with::rust::double_option where fields can be omitted vs present-null, improving (but changing) serialization semantics for nullable properties.
- CHANGED: Many docs under client/docs updated to reflect renamed models, replaced properties, and changed status type references (e.g., ImportedAPIStatus.* -> APIStatus) and new/renamed model docs added (ApiAuditLog, ApiComment, CommentLogData, CommentLogEntry, CommentLogType, PubSubCommentBase, PublicCommentBase, SetCommentTextResult, UpdatableCommentParams, RepeatComment*).
- CHANGED: openapi.json updated extensively: removed ImportedAPIStatus enums, added APIStatus references, introduced new schemas for new/renamed models (APIAuditLog, APICommentBase/APIComment, PubSubCommentBase, PublicCommentBase, SetCommentTextResult, UpdatableCommentParams, CommentLogData/CommentLogEntry/CommentLogType, RepeatComment* enums), added commentsUpdated and notes schema entries, and adjusted many schema properties to be nullable or use referenced types.
- REMOVED: Deleted many generated pick-type model files (PickFComment*, PickApiComment*, PickOmitFComment*, PickFCommentApiCommentFieldsKeysMeta, ImportedApiStatusPeriodFailed, ImportedApiStatusPeriodSuccess, VoteDeleteResponseStatus, and other Pick_* files) as they were replaced by concrete models or consolidated schemas.
- INTERNAL: Updated src/models/mod.rs to add new model modules and remove deprecated/renamed exports (reflecting the above model renames/removals).
- INTERNAL: Update many model constructors (new functions) to accept new types (ApiStatus, ApiComment, ApiAuditLog, etc.) and to initialize newly added optional fields with None/defaults.
- DOCS: README and model lists updated to include new/renamed models and remove deprecated ones; multiple API docs updated to reflect model changes and status type replacements.
- NOTE (for integrators): These changes are not backward compatible. Users must update code to use the new model names/types (ApiComment, ApiCommentBase, PublicCommentBase, PubSubCommentBase, ApiAuditLog, DeletedCommentResultComment, SetCommentTextResult, UpdatableCommentParams, CommentLogEntry/Data/Type, RepeatComment enums) and adapt to ApiStatus usage across responses and function signatures (notably update_comment).
v0.0.2
Readme updates, check-in spec.
Full Changelog: v0.0.1...v0.0.2