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

Add deprecated annotations on shorthand functions for deprecated operations #384

Conversation

simonjbeaumont
Copy link
Collaborator

Motivation

If an operation is marked as deprecated in the OpenAPI document then the generated protocol requirement is annotated as deprecated. However, the shorthand overload for this function, in the protocol extension, was missing this annotation.

Modifications

Add deprecated annotation to the generated function in the protocol extension for deprecated API operations.

Result

If an operation is marked as deprecated in the OpenAPI document then both variants of the generated function (the protocol requirement and the protocol extension) are annotated as deprecated.

Test Plan

Updated the snippet test to include a path with one deprecated operation and one non-deprecated operation.

Related Issues

@simonjbeaumont simonjbeaumont merged commit 3eacb9c into apple:main Nov 17, 2023
8 checks passed
@groue
Copy link

groue commented Nov 22, 2023

I just met this one today :-)

@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Nov 22, 2023
@czechboy0
Copy link
Contributor

@groue we published a release today with the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Operation deprecations don't seem to be added to convenience methods on the APIProtocol extension
3 participants