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

Specify --private=false will not exclude private APIs #942

Closed
chw2054 opened this issue Feb 22, 2021 · 10 comments
Closed

Specify --private=false will not exclude private APIs #942

chw2054 opened this issue Feb 22, 2021 · 10 comments

Comments

@chw2054
Copy link

chw2054 commented Feb 22, 2021

Describe the bug

Hi,

I follow the document, please see @apiPrivate

The following command will not build the doc for public API:

apidoc --private false

Please update the doc:

Command line usage to include private APIs: --private [true]

Information

  • Version of apidoc: 0.26.0
  • Operating system: Linux
  • Browser: Chrome
@NicolasCARPi
Copy link
Collaborator

It is working fine now (in dev branch at least).

@jwerre
Copy link

jwerre commented Jun 20, 2022

I'm having this issue as well where using --private false is equivalent to --private true. Perhaps you could do a little more type checking here:

apiprivate: argv.private,

@NicolasCARPi
Copy link
Collaborator

@jwerre care to propose a PR?

@jwerre
Copy link

jwerre commented Jun 21, 2022

It looks like these may be resolved by upgrading to command v9

tj/commander.js#1652
tj/commander.js#1571

I'll fork, upgrade and test it out.

@jwerre
Copy link

jwerre commented Jun 21, 2022

I upgraded commander to v9 and unfortunately that didn't solve the issue. I don't think there is a great way to fix this other than create a pull request for commander.js or switch to something like minimist where you have a bit more control.

@NicolasCARPi NicolasCARPi reopened this Jun 21, 2022
@jwerre
Copy link

jwerre commented Jun 22, 2022

I'd be happy to create a pull request if you'd be ok with switching to minimist.

@NicolasCARPi
Copy link
Collaborator

I'm surprised that commander.js with its 13 millions users cannot handle bool flags correctly. I would like to stick with commander.js, so if you can look into solving this while keeping the same lib it would be great. I currently don't have the bandwidth to look into it myself.

@jwerre
Copy link

jwerre commented Jun 22, 2022

if you can look into solving this while keeping the same lib it would be great

ok, I'll see if I can get some clarification on this.

@jwerre
Copy link

jwerre commented Jun 22, 2022

tj/commander.js#1759

@jwerre
Copy link

jwerre commented Jun 22, 2022

I got some feedback form the maintainer of commander.js and it seems to make sense.

tj/commander.js#1759 (comment)

Perhaps this isn't an issue worth addressing.

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

No branches or pull requests

3 participants