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

API docs are publishing internal documentation as public #752

Closed
runspired opened this issue May 5, 2021 · 5 comments · Fixed by emberjs/data#7509
Closed

API docs are publishing internal documentation as public #752

runspired opened this issue May 5, 2021 · 5 comments · Fixed by emberjs/data#7509

Comments

@runspired
Copy link
Contributor

code-doc comments marked @internal are now displaying as public API documentation on the ember website api docs.

historically ember-data used this to enable us to document things for contributor tooling that should not be documented in the api docs

you can see an example of this here, underscored methods now show up as public. In the source code they are marked only as @internal not as @public

@jenweber
Copy link
Contributor

jenweber commented May 6, 2021

My expectation is that docs without @public should not show up, regardless of their other labels. This is pretty strange.

To solve this will probably require a fix at the level of ember-jsonapi-docs, but I'm not sure.

@amyrlam
Copy link
Member

amyrlam commented May 6, 2021

Some notes from @acorncom about the implementation (copying here, cause seems like could be useful for the mtg, from: https://discord.com/channels/480462759797063690/480777444203429888/839746419521748992)

DB:

CT:

  • docs are appearing there that don’t get caught by our tests
  • I suspect the tests filter out for only things marked public or private but I could check on that

@jenweber
Copy link
Contributor

jenweber commented May 6, 2021

@runspired would it work to add @private to all the @internal docs? That's the easiest way to ensure that docs don't show up as public moving forward.

Another option is to move the "internal" functions into their files, and configure YUIdoc in the data repo to ignore certain file paths.

Is @internal for intellisense purposes when developing, or something else?

@runspired
Copy link
Contributor Author

@jenweber it's for intellisense when developing. I've noticed since opening this issue that not all things marked internal show up, only some. I think there may more to this mystery, I'll keep investigating but for now I've got a PR to put up that will convert all internal docs to either private or no-tag.

@runspired
Copy link
Contributor Author

runspired commented May 6, 2021

@jenweber after further investigation, any doc comment not marked @private is considered public, not just those using @internal. What's more, it turns out that many public docs have been depending on that since we'd never marked them explicitly public. I wonder if this just never worked the way we thought it did.

Edit: seems we knew this at one time

// docs without internal and without a private flag are published as public by default

(a note from our own docs tests)

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 a pull request may close this issue.

3 participants