-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate deprecation annotations based on OpenAPI document (#92)
### Motivation The OpenAPI spec supports declaring various parts of the API as deprecated, including operations, parameters, schemas, and properties. These can be surfaced in the generated code by adding `@available(*, deprecated)` annotations to the functions, types, and properties. ### Modifications - Support for deprecated OpenAPI schemas. - Support for deprecated OpenAPI properties. - Support for deprecated OpenAPI operations. For deprecated operations, these are annotated on the function requirements in the generated `APIProtocol`. ### Result Deprecated annotations are generated for the parts of the API marked as deprecated in the OpenAPI document. ### Test Plan - Added `#/components/schemas/DeprecatedObject` to reference test. - Added `#/components/schemas/ObjectWithDeprecatedProperty` to reference test. - Marked `#/paths//probe//post` operation as deprecated in reference test. - Marked `#/components/parameters/My-Request-UUID` parameter as deprecated in reference test. - Unit tests for rendering `DeprecatedDescription` already existed. ### Resolves Resolves #26. --------- Signed-off-by: Si Beaumont <[email protected]>
- Loading branch information
1 parent
6b11135
commit 9d9469f
Showing
13 changed files
with
102 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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