Skip to content
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

Add the disableDescription flag, which can be used to NOT print a description for a schema, even if it has been defined previously. #403

Merged
merged 6 commits into from
Dec 11, 2023

Conversation

cmaster11
Copy link
Collaborator

This can also be useful when dealing with objects with patterns and the unknownType meta. In such cases, the description of the unknownType is propagated to the map entry, creating sometimes a bit of confusion because the description belongs to each map entry's value and not its key.

…scription for a schema, even if it has been defined previously.

This can also be useful when dealing with objects with patterns and the `unknownType` meta. In such cases, the description of the `unknownType` is propagated to the map entry, creating sometimes a bit of confusion because the description belongs to each map entry's value and not its key.
Copy link

codecov bot commented Dec 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1a9476b) 98.69% compared to head (e4e8a49) 98.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #403      +/-   ##
==========================================
+ Coverage   98.69%   98.72%   +0.02%     
==========================================
  Files           9        9              
  Lines         537      547      +10     
  Branches      207      209       +2     
==========================================
+ Hits          530      540      +10     
  Misses          7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@mrjono1 mrjono1 left a comment

Choose a reason for hiding this comment

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

the test it doesn't seem to be working?

@cmaster11
Copy link
Collaborator Author

the test it doesn't seem to be working?

@mrjono1 The test is working in the sense that it discards the description, but if the commentEverything flag is on, it will still print the field name (see https://github.com/mrjono1/joi-to-typescript/pull/403/files#diff-9e9125afe9cea21b9041b826bc4d11b91fdc99c938f818a1956c6b397ac0bfc3R73 vs https://github.com/mrjono1/joi-to-typescript/pull/403/files#diff-9e9125afe9cea21b9041b826bc4d11b91fdc99c938f818a1956c6b397ac0bfc3R82). Do you think this flag should override the commentEverything one too?

@mrjono1
Copy link
Owner

mrjono1 commented Dec 11, 2023

yeah I think it should make no jsdoc be produced for this field

@cmaster11
Copy link
Collaborator Author

@mrjono1 what if instead of ignoreDescription I use disableDescription? I think that would be more descriptive of the effect then.

@cmaster11 cmaster11 changed the title Add the ignoreDescription flag, which can be used to NOT print a description for a schema, even if it has been defined previously. Add the disableDescription flag, which can be used to NOT print a description for a schema, even if it has been defined previously. Dec 11, 2023
@mrjono1 mrjono1 merged commit 1ee278f into mrjono1:master Dec 11, 2023
4 checks passed
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