After doing some research on the best way to document swift code. I came across Jazzy and how simple it was to implement. So I follow the installation section of the Jazzy Documentation. I run
sudo gem install jazzy
Then I navigate to the root of my project, in the terminal, and run jazzy
which creates a folder called "docs" with a website that displays documentation for 1 class. I have 87 classes which I can visibly see jazzy looping through in the terminal output.
I've read the NSHipster Tutorial about documenting code which also links you to the Jazzy Documentation as well as the Markup Formatting Reference. I've documented some code, which Xcode displays correctly in the side pane or right clicking the function or class. So i'm fairly certain that my syntax is correct.
I took some time to compare that 1 file to the another file that isn't being displayed and I don't see anything out of the ordinary with regards to format.
I'm running:
My overall question is; Why isn't jazzy producing documentation for all classes and how can I fix this issue?
Typically, one of two things go wrong when running Jazzy for the first time. Either you did not set xcodebuild to use the full Xcode app instead of the pure command line tools or you forgot to specify the workspace or scheme in the parameters.
jazzy is a command-line utility that generates documentation for Swift or Objective-C.
After reading more about jazzy more in depth I found this important piece of information.
By default, jazzy only documents public declarations. To generate documentation for declarations with a lower accessibility level (internal or private), please set the --min-acl flag to internal or private.
Which is in the trouble shooting portion of the jazzy git hub page
I ran jazzy with the following line to produce the documentation i expected:
jazzy --min-acl private
Note I should read everything before I decided something isn't working right.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With