Skip to content

sdk-sync: API 1.4.0+f19c2d4 → sdk-java 2.0.0 (major) - #5

Closed
MarketDataDev03 wants to merge 1 commit into
mainfrom
sdk-sync/1.4.0-f19c2d4
Closed

MarketDataDev03 wants to merge 1 commit into
mainfrom
sdk-sync/1.4.0-f19c2d4

Conversation

@MarketDataDev03

Copy link
Copy Markdown
Owner

Generated by sdk-auto-sync for API release 1.4.0 (commit f19c2d4).

Changes in the API surface

Snapshots 9c18fbb1f58e → 72b3d15f59ad:

~ GET /v1/options/chain/{underlying}/ ?dte: string  (was integer)

What the agent did

tests: The build fails as required, with a compilation error on the not-yet-implemented ExpirationFilter.dteRange(int, int) symbol — confirming the tests are correctly specifying new behaviour ahead of implementation.

Summary

Added three unit tests to src/test/java/com/marketdata/sdk/OptionsResourceTest.java specifying the new behaviour for the dte query parameter's integer → string type change on GET /v1/options/chain/{underlying}/, mirroring the existing ?strike= range convention (StrikeFilter.range):

  • chainExpirationFilterDteRangeTranslatesToDashedDteParam — ExpirationFilter.dteRange(30, 45) must translate to ?dte=30-45 on the wire.
  • expirationFilterDteRangeRejectsMinGreaterThanMax — dteRange(45, 30) must throw IllegalArgumentException ("min must be <= max").
  • expirationFilterDteRangeRejectsNegativeMin — dteRange(-1, 30) must throw IllegalArgumentException ("dte must be non-negative").

The existing dte(int) exact-value tests and validation were left untouched. Ran gradle test --no-daemon --console=plain; it fails at :compileTestJava because ExpirationFilter.dteRange(int, int) doesn't exist yet, confirming the tests correctly drive the required implementation.

implement: All changes are within the allowed paths (src/main/java, src/test/java, docs/), and I did not touch the tests written in phase 1 beyond what already existed.

Summary

Implemented the 1.4.0 API change to GET /v1/options/chain/{underlying}/'s dte query parameter (integer → string), following the same sealed-filter convention StrikeFilter already uses for its ?strike= range syntax:

  • ExpirationFilter: added a new sealed variant DteRange(minDays, maxDays) with factory ExpirationFilter.dteRange(int, int), validating minDays >= 0 and minDays <= maxDays (mirrors dte(int)'s and StrikeFilter.range's existing validation messages).
  • OptionsResource.applyExpirationFilter: renders DteRange as ?dte=min-max, keeping the exhaustive if-chain over the now six-variant sealed type complete (no silent no-op for the new case).
  • docs/options/chain.md: documented the new dteRange(...) builder call alongside the existing dte(...).

No existing tests were weakened — the phase-1 tests are unchanged and now compile and pass. gradle test and gradle build (including Spotless and JaCoCo) both succeed.

changelog: Added an ## [Unreleased] entry noting it responds to API 1.4.0, with an ### Added line for ExpirationFilter.dteRange(...) and a ### Changed BREAKING line explaining the sealed-interface permits expansion and how to migrate exhaustive switches.

Files

  • CHANGELOG.md
  • docs/options/chain.md
  • src/main/java/com/marketdata/sdk/OptionsResource.java
  • src/main/java/com/marketdata/sdk/options/ExpirationFilter.java
  • src/test/java/com/marketdata/sdk/OptionsResourceTest.java

Version

Public-surface change computed by the pipeline: major — next version 2.0.0 (from 1.0.0).

  • added: ExpirationFilter.dteRange(int, int) — New static factory method returning a DteRange filter; throws IllegalArgumentException if minDays is negative or minDays > maxDays. Consumers can now call this method that did not exist before.
  • added: ExpirationFilter.DteRange — New public record type (minDays, maxDays) implementing the sealed ExpirationFilter interface; serializes to the chain endpoint's ?dte=min-max wire form.
  • changed: ExpirationFilter.permits — The sealed interface's permits list gains ExpirationFilter.DteRange alongside the existing OnDate, Dte, Between, MonthYear, All. Any consumer exhaustive switch over ExpirationFilter without a default branch will no longer compile until a DteRange case is added — a source-compatibility break for that specific pattern, though additive in intent.

Reviewer notes

  • none

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.md on this branch.


3 coder run(s) · 2 review(s) · 61 turns · US$ 1.34 · item 14629a56-f611-403a-9c50-77f526c7ce7b

tests: The build fails as required, with a compilation error on the not-yet-implemented `ExpirationFilter.dteRange(int, int)` symbol — confirming the tests are correctly specifying new behaviour ahead of implementation.

## Summary

Added three unit tests to `src/test/java/com/marketdata/sdk/OptionsResourceTest.java` specifying the new behaviour for the `dte` query parameter's `integer` → `string` type change on `GET /v1/options/chain/{underlying}/`, mirroring the existing `?strike=` range convention (`StrikeFilter.range`):

- `chainExpirationFilterDteRangeTranslatesToDashedDteParam` — `ExpirationFilter.dteRange(30, 45)` must translate to `?dte=30-45` on the wire.
- `expirationFilterDteRangeRejectsMinGreaterThanMax` — `dteRange(45, 30)` must throw `IllegalArgumentException` ("min must be <= max").
- `expirationFilterDteRangeRejectsNegativeMin` — `dteRange(-1, 30)` must throw `IllegalArgumentException` ("dte must be non-negative").

The existing `dte(int)` exact-value tests and validation were left untouched. Ran `gradle test --no-daemon --console=plain`; it fails at `:compileTestJava` because `ExpirationFilter.dteRange(int, int)` doesn't exist yet, confirming the tests correctly drive the required implementation.

implement: All changes are within the allowed paths (`src/main/java`, `src/test/java`, `docs/`), and I did not touch the tests written in phase 1 beyond what already existed.

## Summary

Implemented the `1.4.0` API change to `GET /v1/options/chain/{underlying}/`'s `dte` query parameter (integer → string), following the same sealed-filter convention `StrikeFilter` already uses for its `?strike=` range syntax:

- `ExpirationFilter`: added a new sealed variant `DteRange(minDays, maxDays)` with factory `ExpirationFilter.dteRange(int, int)`, validating `minDays >= 0` and `minDays <= maxDays` (mirrors `dte(int)`'s and `StrikeFilter.range`'s existing validation messages).
- `OptionsResource.applyExpirationFilter`: renders `DteRange` as `?dte=min-max`, keeping the exhaustive if-chain over the now six-variant sealed type complete (no silent no-op for the new case).
- `docs/options/chain.md`: documented the new `dteRange(...)` builder call alongside the existing `dte(...)`.

No existing tests were weakened — the phase-1 tests are unchanged and now compile and pass. `gradle test` and `gradle build` (including Spotless and JaCoCo) both succeed.

changelog: Added an `## [Unreleased]` entry noting it responds to API 1.4.0, with an `### Added` line for `ExpirationFilter.dteRange(...)` and a `### Changed` BREAKING line explaining the sealed-interface `permits` expansion and how to migrate exhaustive switches.
@MarketDataDev03
MarketDataDev03 marked this pull request as ready for review September 15, 2026 18:52
@MarketDataDev03
MarketDataDev03 deleted the sdk-sync/1.4.0-f19c2d4 branch September 15, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant