-
Notifications
You must be signed in to change notification settings - Fork 125
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
Generate shorthand throwing APIs for providing inputs and handling outputs #308
Merged
simonjbeaumont
merged 17 commits into
apple:main
from
simonjbeaumont:sb/shorthand-apis-rebase
Oct 3, 2023
Merged
Generate shorthand throwing APIs for providing inputs and handling outputs #308
simonjbeaumont
merged 17 commits into
apple:main
from
simonjbeaumont:sb/shorthand-apis-rebase
Oct 3, 2023
Conversation
This file contains 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
simonjbeaumont
force-pushed
the
sb/shorthand-apis-rebase
branch
from
October 2, 2023 18:48
e83e207
to
51caeb0
Compare
simonjbeaumont
changed the title
Sb/shorthand apis rebase
Generate shorthand throwing APIs for providing inputs and handling outputs
Oct 3, 2023
Signed-off-by: Si Beaumont <[email protected]>
Signed-off-by: Si Beaumont <[email protected]>
Signed-off-by: Si Beaumont <[email protected]>
Signed-off-by: Si Beaumont <[email protected]>
simonjbeaumont
force-pushed
the
sb/shorthand-apis-rebase
branch
from
October 3, 2023 10:25
51caeb0
to
8cb80bb
Compare
czechboy0
approved these changes
Oct 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few suggestions, but no blockers so I'll let you make the final call on these.
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponse.swift
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponse.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponse.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponseOutcome.swift
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponseOutcome.swift
Outdated
Show resolved
Hide resolved
@swift-server-bot test this please |
@swift-server-bot test this please |
3 similar comments
@swift-server-bot test this please |
@swift-server-bot test this please |
@swift-server-bot test this please |
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.
Motivation
The review period for SOAR-0007 (Shorthand APIs for inputs and outputs) has now concluded. This pull request adds the required SPIs to the runtime library to throw a runtime error when the response and/or body does not match that of the shorthand API being used.
For further context, please review the proposal itself.1
Modifications
APIProtocol
with an overload for each operation that lifts each of the parameters ofInput.init
as function parameters.Result
Code that used to be written like this
Test Plan
This PR includes updates to the various tests:
SnippetBasedReferenceTests
FileBasedReferenceTests
PetstoreConsumerTests
Related Issues
Footnotes
https://github.com/apple/swift-openapi-generator/pull/291 ↩