Skip to content

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
@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