Repository navigation
fix(div,splits): align spec with live API behaviour - #18
Open
alexpipipi wants to merge 1 commit into
Open
alexpipipi wants to merge 1 commit into
alexpipipi wants to merge 1 commit into
Conversation
Verified against the live API on 2026-09-16. - fmt default is csv, not json. Omitting fmt returns CSV from both endpoints. The parameter is also case-sensitive: fmt=JSON, fmt=Json and fmt=xml all silently fall back to CSV; only lowercase json returns JSON. - Document text/csv as a 200 representation, since it is what the default now produces. - Remove the 400 response. Invalid parameters do not produce it — from=garbage returns 200 with an empty array. - Add the 403 response, which is returned and was undocumented (ticker outside the key's subscription). - Narrow the 404 description: an out-of-range date window returns 200 with an empty array, not 404.
This branch has not been deployed
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.
Found while rewriting the Corporate Actions docs article. The spec for
/div/{ticker}and/splits/{ticker}disagrees with the live API in four places. Everything below was re-verified with live requests againsteodhd.com/apion 2026-09-16 using the demo key.1.
fmtdefault iscsv, notjsonThe spec declares
default: json. Omittingfmtreturns CSV from both endpoints:This is the one with real downstream cost: every generated SDK and every Redoc reader is being told the wrong default, so a client that omits
fmtand parses the body as JSON breaks.The parameter is also case-sensitive with a silent fallback —
fmt=JSON,fmt=Jsonand evenfmt=xmlall return CSV. Only lowercasejsonreturns JSON. Added to the description.2.
text/csvis now documented as a 200 representationConsequence of the above: with the default being CSV, documenting only
application/jsonunder200left the spec self-contradictory. Added atext/csvschema and example alongside the existing JSON one.This is the most opinionated part of the PR — happy to drop it if you'd rather keep the response block JSON-only.
3.
400 Invalid request parametersis never returnedBad parameters give
200with an empty array:Removed.
4.
403is returned and was undocumentedA ticker outside the key's subscription returns
403, not401or404:Added.
Also narrowed the
404description: it said "not found for the specified ticker or date range", but an out-of-range date window returns200with an empty array (see 3), so only the ticker half is true.Checks
npm run validate,npm run buildandnpm run checkall pass locally. The 3 redocly warnings are pre-existing and relate to the options schemas, untouched here.