Conversation
Owner
i2h3
commented
Jan 5, 2026
- Introduced Quota and AvailableQuota models for directory properties.
- Extended Item model accordingly.
- Extended ResponseParser accordingly to consider optional quota information.
- Refactored Listing request body to now include quota information, sorted and empty tags for improved readability.
There was a problem hiding this comment.
Pull request overview
This PR implements quota information fetching for directories as outlined in issue #10. The changes introduce new models (Quota and AvailableQuota) to represent directory storage restrictions and usage, extend the Item model to include quota data, and update the response parser to handle optional quota information from WebDAV responses.
- Introduced
QuotaandAvailableQuotamodels for directory storage information - Extended
Itemmodel with optional quota property for directories - Updated
ResponseParserto parse quota fields from WebDAV responses - Refactored test infrastructure with separate Headers and Body files for better testing
- Enhanced error handling with
unexpectedStatuscase
Reviewed changes
Copilot reviewed 33 out of 54 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Sources/Rainmaker/Models/AvailableQuota.swift |
New model defining quota availability states (limited, unlimited, unknown, uncomputed) |
Sources/Rainmaker/Models/Quota.swift |
New model containing available and used quota information |
Sources/Rainmaker/Models/Item.swift |
Extended with optional quota property and improved documentation |
Sources/Rainmaker/Responses/ResponseParser.swift |
Added parsing logic for quota-used-bytes and quota-available-bytes |
Sources/Rainmaker/Requests/Bodies/Listing.xml |
Added quota property requests and sorted properties for readability |
Sources/Rainmaker/Server.swift |
Added HTTP response status validation for listing requests |
Sources/Rainmaker/RainmakerError.swift |
Added unexpectedStatus error case |
Tests/RainmakerTests/URLTestSession.swift |
Refactored to separate Headers and Body files; renamed resourcePath to testResources |
Tests/RainmakerTests/Extensions/HTTPURLResponse+init.swift |
New test helper for creating HTTPURLResponse from fixture files |
Tests/RainmakerTests/RainmakerTestsError.swift |
New error types for test infrastructure |
| Various test fixture files | Added Headers.txt and Body.xml/json files for all test scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
- Introduced Quota and AvailableQuota models for directory properties. - Extended Item model accordingly. - Extended ResponseParser accordingly to consider optional quota information. - Refactored Listing request body to now include quota information, sorted and empty tags for improved readability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.