Repository navigation
sdk-sync: API 1.4.0+f19c2d4 → sdk-java 2.0.0 (major) - #7
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: Added tests in `OptionsResourceTest.java` specifying the new `dte` range behavior for `GET /v1/options/chain/{underlying}/` now that `?dte=` is a string rather than a plain integer:
- `chainExpirationFilterDteRangeTranslatesToDashedDteParam` — expects a new `ExpirationFilter.dteRange(min, max)` factory to render the wire form `?dte=MIN-MAX`, mirroring the existing `StrikeFilter.range` "MIN-MAX" convention already used for the sibling `strike` parameter.
- `expirationFilterDteRangeRejectsNegativeMin` — expects the same non-negative validation message as the existing single-value `ExpirationFilter.dte(int)`.
- `expirationFilterDteRangeRejectsMinGreaterThanMax` — expects a `min must be <= max` validation error, matching `StrikeFilter.range`'s existing message convention.
Ran `gradle test --no-daemon --console=plain`: it fails at `compileTestJava` with "cannot find symbol: method dteRange(int,int)" on `ExpirationFilter`, confirming the tests correctly specify not-yet-implemented behavior. No production code was modified.
implement: All changes stay within the allowed paths (`src/main/java`, `src/test/java`, `docs`), and no `build.gradle*`/`settings.gradle*`/CI/gradle-wrapper files were touched. Nothing was committed.
Summary for the PR:
- Widened the options chain `dte` filter to match the API's `1.4.0` change of `?dte` from `integer` to `string`: added `ExpirationFilter.dteRange(int min, int max)`, a new sealed variant (`ExpirationFilter.DteRange`) that renders as `?dte=MIN-MAX`, mirroring the existing `StrikeFilter.range` dashed-string convention already used for `?strike=`.
- Wired the new variant into `OptionsResource.applyExpirationFilter` alongside the existing `Dte`/`Between`/`MonthYear` handling; the pre-existing single-value `ExpirationFilter.dte(int)` (`?dte=N`) is unchanged.
- Validation on `dteRange` mirrors the sibling factories: non-negative `min` (same message as `dte(int)`) and `min <= max` (same message as `StrikeFilter.range`).
- Updated `docs/options/chain.md` to list the new `dteRange` filter alongside the other `ExpirationFilter` variants.
- No test changes were needed beyond what was written in phase 1 — all phase-1 tests pass unmodified; `gradle test` and `gradle build` (including Spotless and JaCoCo) both succeed.
changelog: Added an `[Unreleased]` entry documenting the new `ExpirationFilter.dteRange`/`DteRange` API (responding to Market Data API 1.4.0's `dte` int→string change) under `### Added`, plus a `### Changed` BREAKING note explaining the new sealed permit breaks non-`default` exhaustive switches over `ExpirationFilter` and how to migrate.
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: Added tests in
OptionsResourceTest.javaspecifying the newdterange behavior forGET /v1/options/chain/{underlying}/now that?dte=is a string rather than a plain integer:chainExpirationFilterDteRangeTranslatesToDashedDteParam— expects a newExpirationFilter.dteRange(min, max)factory to render the wire form?dte=MIN-MAX, mirroring the existingStrikeFilter.range"MIN-MAX" convention already used for the siblingstrikeparameter.expirationFilterDteRangeRejectsNegativeMin— expects the same non-negative validation message as the existing single-valueExpirationFilter.dte(int).expirationFilterDteRangeRejectsMinGreaterThanMax— expects amin must be <= maxvalidation error, matchingStrikeFilter.range's existing message convention.Ran
gradle test --no-daemon --console=plain: it fails atcompileTestJavawith "cannot find symbol: method dteRange(int,int)" onExpirationFilter, confirming the tests correctly specify not-yet-implemented behavior. No production code was modified.implement: All changes stay within the allowed paths (
src/main/java,src/test/java,docs), and nobuild.gradle*/settings.gradle*/CI/gradle-wrapper files were touched. Nothing was committed.Summary for the PR:
dtefilter to match the API's1.4.0change of?dtefromintegertostring: addedExpirationFilter.dteRange(int min, int max), a new sealed variant (ExpirationFilter.DteRange) that renders as?dte=MIN-MAX, mirroring the existingStrikeFilter.rangedashed-string convention already used for?strike=.OptionsResource.applyExpirationFilteralongside the existingDte/Between/MonthYearhandling; the pre-existing single-valueExpirationFilter.dte(int)(?dte=N) is unchanged.dteRangemirrors the sibling factories: non-negativemin(same message asdte(int)) andmin <= max(same message asStrikeFilter.range).docs/options/chain.mdto list the newdteRangefilter alongside the otherExpirationFiltervariants.gradle testandgradle build(including Spotless and JaCoCo) both succeed.changelog: Added an
[Unreleased]entry documenting the newExpirationFilter.dteRange/DteRangeAPI (responding to Market Data API 1.4.0'sdteint→string change) under### Added, plus a### ChangedBREAKING note explaining the new sealed permit breaks non-defaultexhaustive switches overExpirationFilterand how to migrate.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.permits— Sealed permits list gains ExpirationFilter.DteRange alongside OnDate, Dte, Between, MonthYear, All. Any consumer code that pattern-matches/switches exhaustively over ExpirationFilter without adefaultbranch will no longer compile until a DteRange case is added.ExpirationFilter.dteRange(int, int)— New static factory returning ExpirationFilter.DteRange; throws IllegalArgumentException if min < 0 ("dte must be non-negative") or min > max ("min must be <= max").ExpirationFilter.DteRange— New public record variant of ExpirationFilter with componentsint min()andint max()and a public canonical constructor DteRange(int min, int max); serializes to the wire form ?dte=MIN-MAX via OptionsResource's internal query-building (package-private, not itself public surface).Reviewer notes
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) · 48 turns · 2,539,208 tokens · US$ 1.60 · item
79663cca-7c85-4584-bbeb-401d476852c8Agent runs