Repository navigation
sdk-sync: API 1.4.0+f19c2d4 → sdk-java 2.0.0 (major) - #6
Closed
MarketDataDev03 wants to merge 1 commit into
Closed
MarketDataDev03 wants to merge 1 commit into
MarketDataDev03 wants to merge 1 commit into
Conversation
tests: Only the test file was touched, as required.
## Summary
The API delta changes `?dte=` on `GET /v1/options/chain/{underlying}/` from `integer` to `string`, mirroring the existing `?strike=` parameter which already accepts a dashed range as a string (`StrikeFilter.range`). I added three tests to `src/test/java/com/marketdata/sdk/OptionsResourceTest.java` that specify the new `ExpirationFilter.dte(int minDays, int maxDays)` range overload, alongside the existing single-value `dte(int)`:
- `chainExpirationFilterDteRangeTranslatesToDashedDteParam` — asserts `ExpirationFilter.dte(30, 60)` serializes the chain request query string as `?dte=30-60`.
- `expirationFilterDteRangeRejectsNegativeMin` — asserts `dte(-1, 30)` throws `IllegalArgumentException` ("dte must be non-negative").
- `expirationFilterDteRangeRejectsMinGreaterThanMax` — asserts `dte(60, 30)` throws `IllegalArgumentException` ("min must be <= max").
Confirmed `gradle test --no-daemon --console=plain` fails at compilation (the two-arg `dte` overload doesn't exist yet), as expected for this tests-only phase. No production code or docs were touched.
implement: All changes fall within `src/main/java/`, `src/test/java/`, and `docs/`, as required. No commits made.
## Summary
Implemented `?dte=` widening to `string` on `GET /v1/options/chain/{underlying}/` by adding a days-to-expiration range alongside the existing single-value filter:
- `ExpirationFilter.DteRange` — new sealed-interface variant (`minDays`, `maxDays`), added to the `permits` list.
- `ExpirationFilter.dte(int minDays, int maxDays)` — new overload of the existing `dte` factory, validating non-negativity and `min <= max` (mirrors `StrikeFilter.range`'s validation style).
- `OptionsResource.applyExpirationFilter` — serializes `DteRange` as `?dte=min-max` (e.g. `dte=30-60`), matching the dashed-range convention already used for `?strike=`.
- `docs/options/chain.md` — added the new `dte(minDays, maxDays)` builder call to the request-shape listing.
Fixed one Spotless formatting violation in the phase-1 test (line wrap on the range test) — no assertions were weakened. `gradle test` and `gradle build` both pass.
changelog: Added a `### Changed` entry under `[Unreleased]` documenting the new `ExpirationFilter.dte(int, int)`/`DteRange` range filter (API 1.4.0's `dte` param widening to a string), flagged BREAKING with migration guidance for exhaustive `switch` consumers.
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.
Generated by sdk-auto-sync for API release 1.4.0 (commit
f19c2d4).Changes in the API surface
Snapshots
9c18fbb1f58e→72b3d15f59ad:What the agent did
tests: Only the test file was touched, as required.
Summary
The API delta changes
?dte=onGET /v1/options/chain/{underlying}/fromintegertostring, mirroring the existing?strike=parameter which already accepts a dashed range as a string (StrikeFilter.range). I added three tests tosrc/test/java/com/marketdata/sdk/OptionsResourceTest.javathat specify the newExpirationFilter.dte(int minDays, int maxDays)range overload, alongside the existing single-valuedte(int):chainExpirationFilterDteRangeTranslatesToDashedDteParam— assertsExpirationFilter.dte(30, 60)serializes the chain request query string as?dte=30-60.expirationFilterDteRangeRejectsNegativeMin— assertsdte(-1, 30)throwsIllegalArgumentException("dte must be non-negative").expirationFilterDteRangeRejectsMinGreaterThanMax— assertsdte(60, 30)throwsIllegalArgumentException("min must be <= max").Confirmed
gradle test --no-daemon --console=plainfails at compilation (the two-argdteoverload doesn't exist yet), as expected for this tests-only phase. No production code or docs were touched.implement: All changes fall within
src/main/java/**,src/test/java/**, anddocs/**, as required. No commits made.Summary
Implemented
?dte=widening tostringonGET /v1/options/chain/{underlying}/by adding a days-to-expiration range alongside the existing single-value filter:ExpirationFilter.DteRange— new sealed-interface variant (minDays,maxDays), added to thepermitslist.ExpirationFilter.dte(int minDays, int maxDays)— new overload of the existingdtefactory, validating non-negativity andmin <= max(mirrorsStrikeFilter.range's validation style).OptionsResource.applyExpirationFilter— serializesDteRangeas?dte=min-max(e.g.dte=30-60), matching the dashed-range convention already used for?strike=.docs/options/chain.md— added the newdte(minDays, maxDays)builder call to the request-shape listing.Fixed one Spotless formatting violation in the phase-1 test (line wrap on the range test) — no assertions were weakened.
gradle testandgradle buildboth pass.changelog: Added a
### Changedentry under[Unreleased]documenting the newExpirationFilter.dte(int, int)/DteRangerange filter (API 1.4.0'sdteparam widening to a string), flagged BREAKING with migration guidance for exhaustiveswitchconsumers.Files
CHANGELOG.mddocs/options/chain.mdsrc/main/java/com/marketdata/sdk/OptionsResource.javasrc/main/java/com/marketdata/sdk/options/ExpirationFilter.javasrc/test/java/com/marketdata/sdk/OptionsResourceTest.javaVersion
Public-surface change computed by the pipeline: major — next version 2.0.0 (from 1.0.0).
ExpirationFilter.dte(int, int)— New static factory overload returning ExpirationFilter.DteRange; validates minDays/maxDays non-negative and minDays <= maxDays, translates to wire form ?dte=min-max. Distinct arity from the existing dte(int) overload, so no overload-resolution conflict for existing callers.ExpirationFilter.DteRange— New public record type implementing ExpirationFilter, with accessors minDays() and maxDays(); added as a new permitted subtype of the sealed interface.ExpirationFilter.permits— Sealed interface's permits list now includes ExpirationFilter.DteRange alongside OnDate, Dte, Between, MonthYear, All. Any consumer code that exhaustively switches over ExpirationFilter (relying on compiler-enforced exhaustiveness) will fail to compile until it adds a DteRange case.Reviewer notes
expirationFilterDteRangeRejectsNegativeMintest only exercises theminDays < 0branch ofExpirationFilter.dte(int, int)'s validation. There is no corresponding test for a negativemaxDayswith a non-negativeminDays(e.g.dte(5, -1)), leaving that branch of theminDays < 0 || maxDays < 0condition unverified.Job log
The full record of this job — every phase, test and build result, review findings and how they were resolved — is in
.sdk-sync/1.4.0-f19c2d4.mdon this branch.3 coder run(s) · 2 review(s) · 51 turns · 2,398,386 tokens · US$ 1.43 · item
da2a4be2-d8d2-454b-b73f-cf4ff129365bAgent runs