fix: remove redundant api_token param (#2) + consistent real-time volume type (#3)#8
Open
alexpipipi wants to merge 1 commit into
Open
fix: remove redundant api_token param (#2) + consistent real-time volume type (#3)#8alexpipipi wants to merge 1 commit into
alexpipipi wants to merge 1 commit into
Conversation
…ume type (#3) Closes #2: the global `EODHDQueryKey` security scheme (apiKey, in query, name `api_token`) already mandates the token, but every endpoint also declared `api_token` as an explicit required query parameter. This forced OpenAPI codegen to require a manual `api_token` arg on every method call. Removed the explicit parameter from all 69 path files and deleted the now -orphaned `components/parameters/ApiToken` component. Auth is still enforced via the global scheme; codegen now injects the key via client config. Closes #3: `/real-time/{ticker}` declared `volume` as `integer` in the single-object response but `[integer, null]` in the array variant. Made both `[integer, null]` (verified against live API: FOREX returns volume 0, non-traded assets can be null). Also corrects 16 pre-existing example/format mismatches that `redocly lint` escalated to a CI-blocking error once the redundant params were removed. Each correction was verified against the live EODHD API: - economic-events: `date` is not RFC3339 date-time (API returns 'YYYY-MM-DD HH:MM:SS'); removed the wrong `format: date-time`; example `estimate: ""` -> null (schema is [number, null]). - intraday: same `datetime` format correction. - exchange-details: TradingHours times have no TZ offset; removed the wrong `format: time`. - eod-bulk-last-day: dividends example used "" for nullable date fields; changed declaration/record/paymentDate to null. - mp/unicornbay/spglobal/list: example `Dividend: ""` -> number. redocly lint: valid, 0 errors, 0 warnings. Bundle builds clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Fixes the two OpenAPI issues filed by @jogold, plus the example/format mismatches that surfaced as a CI-blocking lint error once the redundant params were removed.
#2 — Remove explicit
api_tokenparameter (Closes #2)The global
EODHDQueryKeysecurity scheme (apiKey, in query, nameapi_token) already mandates the token, but every endpoint also declaredapi_tokenas an explicit required query parameter. This forced OpenAPI code generators to require a manualapi_tokenargument on every method call.api_tokenparameter from all 69 path filescomponents/parameters/ApiTokencomponent (it had no$refusers)name: api_tokenremains in the bundled spec only insecuritySchemes.EODHDQueryKeyProof (resolved params from the bundled spec):
/real-time/{ticker}parametersticker, s,api_token, ex, fmtticker, s, ex, fmtGlobal
security: [EODHDQueryKey: []]unchanged → codegen now injects the key via client config instead of a per-method arg.#3 — Consistent
volumetype in/real-time(Closes #3)Single-object response declared
volume: integer; array variant declared[integer, null]. Made both[integer, null]. Verified against the live API (FOREX returnsvolume: 0, non-traded assets can be null).Example/format corrections (required for green CI)
Removing the redundant params caused
redocly lint(run bynpm run validatein CI) to escalate 16 pre-existing example warnings into a blocking error. Each was corrected against the live EODHD API:dateis not RFC3339 ('YYYY-MM-DD HH:MM:SS'); removed wrongformat: date-time; exampleestimate: ""→nulldatetimeformat correctionformat: time""for nullable date fields →nullDividend: ""→ numberVerification
redocly lint: ✅ valid, 0 errors, 0 warnings (main currently has 16 warnings)redocly bundle: ✅ builds clean