Skip to content

fix(deprecated): property with deprecated=false was shown as @deprecated #421

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

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

qboot
Copy link
Contributor

@qboot qboot commented Oct 19, 2022

We sometimes have in our OpenAPI schema some properties with the "deprecated": false flag.
These properties are annotated as @deprecated even with the flag set to false.

This PR fixes this issue and add a related test.

@js2me js2me deleted the branch acacode:next October 21, 2022 21:33
@js2me js2me closed this Oct 21, 2022
@qboot
Copy link
Contributor Author

qboot commented Oct 21, 2022

Same question here @js2me, can you elaborate on why this PR has been closed? Thx!

@js2me
Copy link
Member

js2me commented Oct 24, 2022

@qboot This PR was closed automatically after delete next branch

@js2me js2me reopened this Oct 24, 2022
@js2me
Copy link
Member

js2me commented Oct 24, 2022

Please apply this changes

defined(property.deprecated) && property.deprecated && `@deprec

to
templates/base/data-contract-jsdoc.ejs

@@ -5,7 +5,7 @@ const { formatDescription, require, _ } = utils;
const jsDocLines = _.compact([
data.title,
data.description && formatDescription(data.description),
data.deprecated === true && '@deprecated',
!_.isUndefined(data.deprecated) && data.deprecated && '@deprecated',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this? @js2me

@js2me
Copy link
Member

js2me commented Oct 27, 2022

@qboot thank you for you contribution !

@js2me js2me merged commit 24a0cd3 into acacode:next Oct 27, 2022
js2me added a commit that referenced this pull request Oct 27, 2022
* docs: add link to article about swagger typescript api lessons in README

* fix: problems with path params with dots

* internal: add gitattributes

* feat: ability to modify code gen constructs;
feat: --another-array-type cli option (Array<Type>);
docs: update CHANGELOG, README

* bump: 11.0.0; refactor: codebase of project, `data-contract-jsdoc.ejs` incompatible with prev version, see CHANGELOG

* docs: typo fix

* feat: improve jsdoc fields declaration

* docs: update README

* chore: add .nvmrc

* fix: problems due to new version; feat: new cli utility

* fix(deprecated): property with deprecated=false was shown as deprecated (#421)

* document approach to disabling output (#325)

* Added "generateClient", "typePrefix", "typeSuffix" options to readme for NodeJS usage (#335)

Co-authored-by: Feargal Kavanagh <[email protected]>
Co-authored-by: Sergey S. Volkov <[email protected]>

* fix: ci\cd build; fix: try\catch for cli operation

* refactor: templates

* fix: replace Iterable<any> to any[] in axios-http-client to solve type bugs linked with Iterable

* feat: add new command (generate-templates)

* docs: update CHANGELOG

* fix: tests, scriptsRunner

Co-authored-by: Quentin Brunet <[email protected]>
Co-authored-by: Ben Watkins <[email protected]>
Co-authored-by: Feargal Kavanagh <[email protected]>
Co-authored-by: Feargal Kavanagh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants