openapi-typescript-codegen
openapi-typescript-codegen copied to clipboard
[Feature] Exclude deprecated properties
I'd like a flag that causes deprecated properties to be excluded from the generated types. The use-case would be when you need to keep a property around in the API spec for backwards compatibility with older clients but you want to discourage any updated clients from accessing it. For the flag I'm thinking:
--includeDeprecatedModelProperties <value> Include deprecated properties in exported models (default: true)
Should be able to submit a PR shortly
any news?
Here's what I came up with: https://github.com/ferdikoomen/openapi-typescript-codegen/compare/master...elliotdickison:openapi-typescript-codegen:exclude-deprecated-properties
Never polished or submitted a PR because of #1276
@elliotdickison have you tried https://www.npmjs.com/package/eslint-plugin-deprecation?