Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Runtime] Add headerFields and body to UndocumentedPayload #90

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

czechboy0
Copy link
Collaborator

Motivation

The runtime changes for apple/swift-openapi-generator#299.

Modifications

Added headerFields and body properties to UndocumentedPayload, allowing adopters to access the full request information when an undocumented response is returned.

Result

Easier access to the raw payload when an undocumented response is returned.

Test Plan

These are just the runtime changes, tested together with generated changes.

@czechboy0 czechboy0 added the semver/minor Adds new public API. label Dec 15, 2023
@czechboy0 czechboy0 merged commit fd101c3 into apple:main Dec 15, 2023
8 checks passed
@czechboy0 czechboy0 deleted the hd-undocumented-payload-properties branch December 15, 2023 12:58
czechboy0 added a commit to apple/swift-openapi-generator that referenced this pull request Dec 15, 2023
### Motivation

Fixes #299.

~Depends on apple/swift-openapi-runtime#90
landing first and getting released, and the version dependency being
bumped here.~

Runtime dependency bumped to 1.1.0.

### Modifications

Adapted to the runtime changes, added `headerFields` and `body`
properties to `UndocumentedPayload`.

Now, the generated code actually also forwards the values to it.

### Result

Easier access to the raw response data if an undocumented response is
returned.

### Test Plan

Adapted snippet and file-based reference tests, and also the unit tests
of the generated code (PetstoreConsumerTests).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants