-
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 deprecation annotations based on OpenAPI document #92
Generate deprecation annotations based on OpenAPI document #92
Conversation
Heh... I hadn't considered that our CI is building with warning-as-error and that this now generates a warning because there's deprecated symbols:
Will update the flags in the CI build. |
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.
Looks great, thanks! Just added a few nits.
Sources/_OpenAPIGeneratorCore/Translator/CommonTranslations/translateStructBlueprint.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/CommonTypes/StructBlueprint.swift
Outdated
Show resolved
Hide resolved
3f36499
to
7723dc8
Compare
7723dc8
to
234770e
Compare
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.
Looks great!
### Motivation In #92 we made some changes to the Compose files for CI. It introduced some typos in some comments. ### Modifications Fix typos in the compose files. ### Result Compose files don't have typos. ### Test Plan None. Signed-off-by: Si Beaumont <[email protected]>
Changing from semver/minor to semver/patch, as it only causes a build error if you explicitly opt in to warnings as errors, in which case we don't consider that a semver break. |
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
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
#/components/schemas/DeprecatedObject
to reference test.#/components/schemas/ObjectWithDeprecatedProperty
to reference test.#/paths//probe//post
operation as deprecated in reference test.#/components/parameters/My-Request-UUID
parameter as deprecated in reference test.DeprecatedDescription
already existed.Resolves
Resolves #26.