fix: align OpenAPI events limit max with code constant (500 -> 200)#942
Open
CHKM001 wants to merge 1 commit into
Open
fix: align OpenAPI events limit max with code constant (500 -> 200)#942CHKM001 wants to merge 1 commit into
CHKM001 wants to merge 1 commit into
Conversation
Contributor
Author
|
@ogazboiz ready... |
Contributor
|
your branch is green, but it went conflicting after the ci fixes landed on main: #969 and #974 touched backend/Dockerfile and backend/src/workers/soroban-event-worker.ts, which this pr also edits. please rebase on main and it should be good to go: |
Contributor
Author
|
okay thank you will hash it out in a bit |
fb82464 to
5d7cf86
Compare
Closes LabsCrypt#814 GET /v1/streams/{streamId}/events documented limit parameter with maximum: 500 but the runtime code caps at MAX_EVENTS_PAGE_SIZE (200). A client requesting limit=400 would silently receive at most 200 rows, contradicting the published contract. Changed maximum: 500 -> maximum: 200 in the JSDoc annotation to match the existing MAX_EVENTS_PAGE_SIZE constant in events.routes.ts.
681a631 to
40f6fc5
Compare
Contributor
Author
|
@ogazboiz I have done it as requested. Please merge! |
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.
PR #814 Fix OpenAPI events limit max mismatch (500 → 200)
Problem
GET /v1/streams/{streamId}/eventsdocumentedlimitparameter withmaximum: 500instream.routes.ts:94, but the runtime code inevents.routes.ts:24definesMAX_EVENTS_PAGE_SIZE = 200and the controller clamps to that value. A client requestinglimit=400would silently receive at most 200 rows, contradicting the published contract.Change
backend/src/routes/v1/stream.routes.ts:94-95— Changedmaximum: 500→maximum: 200andmax: 500→max: 200in the description to matchMAX_EVENTS_PAGE_SIZE.Verification
The
/api-docs.jsonendpoint is generated dynamically from the JSDoc annotations viaswagger-jsdoc, so the corrected value will appear automatically.Closes #814