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
Update dox
to latest version and fix some documentation issues
#12024
Conversation
This change is required because since dox 0.5.0 a error will be thrown if "return" present but empty This change also extends the message to say what gets returned
This change is required because since dox 0.5.0 a error will be thrown if "return" present but empty This change also extends the message to say what gets returned
… "QueryCursor.prototype[Symbol.asyncIterator]"
This also changes the description for the parameters to match "SchemaType.set" and not cause bad formatting Also upates the return type to "void"
This also sometimes somehow messes-up the documentation styling
The things that were defined there are set via other things anyway, and many did not even have it set
This also changes the description for the parameters to match "SubdocumentPath.set" and not cause bad formatting Also upates the return type to "void"
…unction" and "static" This fixes static "Schematype" properties to be in a different case than instance properties
Note: there are currently conflicts with the base branch, but i will resolve them once it is ready for merge (after having had reviews) |
…s loop This will make setting "ctx.string" consistently and should make it independent of tag order (Also thanks to the previous commit warns against both "instance" and "static")
…Map" to reflect actual name
…and add "@static"
…memberOf" handling
… result in a empty field
…ber all values This makes use of https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html and is still fully compatible with plain js
This currently does not add anything to the final documentation, because i dont know which style it should be
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.
I have now updated the branch to include the latest master again (because documentation changes were made), and i also have touched-up some of the documentation again, which includes:
- adding some comments to signal what is doing what
- move most string manipulation handling to after the "tags" loop
- add a jsdoc "typedef" to remember all properties
- add a proper type for
@returns {void}
or{undefined}
as to not result in empty fields
Also some other discussion questions:
- should tags and handling for
@receiver
be removed and be replaced with the proper tags everywhere? - should
{Any}
maybe be replaced again everywhere with{*}
? because by jsdoc definition{*}
is the proper "any" type, but currently otherwise causing some documentation style problems
case 'deprecated': | ||
ctx.deprecated = true; | ||
break; |
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.
i have now included basic handling for @deprecated
tag, but i am not sure where or in what style it should appear in the documentation
Made another small update which does:
Edit:
|
…stead of adding to "return" This is changed because "return" property was never used, but the "description" was (in pug files) but i am not familiar with pug to change that Also updates the second "replace" call because "\n" is mostly added to the end which makes it ineffective
This is to change the style to be consistent and headers with ":" seem to be the most used, so it was changed to that
I would say this PR is finished for changes, unless some are requested / merging latest master, some changes could probably be put in their own PR / cherry-picked to land sooner. i would like to request @vkarpov15 to review this PR for correctness |
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.
Code is LGTM. I'll review this more after I merge, it's easier to test after merging to master because we don't have deployment previews.
isnt the script PS: also there were still some open discussion questions |
Summary
This PR updates dependency
dox
from0.3.1
(from 2015) to0.9.1
(from 2022), which should address #8925 at least a littlere #8925
This PR:
yarn.lock
gotgitignore
(becausepackage-lock.json
was already in it)@returns
tags to be properly set (meaning to have types)[Type]
were used when jsdoc only allowsType[]
orArray<Type>
)VirtualType.prototype.set
andVirtualType.prototype.get
because they were not proper jsdoc (also dox did not want to correctly register things like@callback
or@typedef
or@type
with@name
) (7155089)@memberOf
tags to many jsdoc comments (because they were missing and resulting in wrong documentation)SchemaType.prototype.castFunction
being listed ascast
@static
and@function
fromSchemaType.prototype.castFunction
DocumentArrayPath.set
andSubdocumentPath.set
to the correct location-
in@param
descriptions, because they were making the documentation formatting weird (e57594c)@param {*}
with@param {Any}
to be more consistent and also because*
was making the documentation formatting weird (953853f)@static
because in later versions ofdox
nothing was given to the processing anymore and was also not proper jsdoc (but things are still defined thanks to other things) (1719bf6)ctx
indocs/source/api.js
namedisFunction
that after processing adds()
to the end of thectx.string
, this was done because things like@function
and@static
could be in a different sequence than expectedctx.constructor
overdata.name
for static properties (to be consistent with non-static properties) (cfe7248)ctx
(39a02a1)PS: this PR also fixes some documentation issues that are visible in current
master
Note: please only someone with knowledge of how the documentation works merge this PR