Open
Conversation
This avoids the StructToMap. There are other cases when this should be used: eventData, resultData, illTransactionData, Peer.customData but in a seperate PR
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the patron-requests OpenAPI-generated models/handlers to use a strongly-typed iso18626.Request for illRequest instead of an untyped map[string]any.
Changes:
- Switch API handler and tests from
map[string]interface{}-basedillRequesthandling toiso18626.Request. - Simplify ILL request validation by operating directly on the typed request (no marshal/unmarshal roundtrip).
- Configure oapi-codegen to use an overlay intended to type
illRequestin generated code.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| broker/patron_request/api/api-handler.go | Returns and validates typed iso18626.Request for illRequest in API models/logic. |
| broker/patron_request/api/api-handler_test.go | Updates unit tests to construct and pass typed ISO18626 requests. |
| broker/test/patron_request/api/api-handler_test.go | Updates integration tests/assertions to use typed ISO18626 requests end-to-end. |
| broker/oapi/pr-cfg.yaml | Adds oapi-codegen overlay configuration intended to type illRequest in generated code. |
…nd Peer.customData
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.
This avoids the StructToMap for iso18626.Request, eventData, resultData, illTransactionData and Peer.customData