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

Generate API doc #3

Closed
beltex opened this issue Aug 28, 2014 · 8 comments
Closed

Generate API doc #3

beltex opened this issue Aug 28, 2014 · 8 comments

Comments

@beltex
Copy link
Owner

beltex commented Aug 28, 2014

Generate an API doc (like javadoc).

Swift support for this is coming. See:

@beltex
Copy link
Owner Author

beltex commented Nov 1, 2014

jazzy's had some major updates, so this can be looked at again.

@beltex
Copy link
Owner Author

beltex commented Dec 14, 2014

Completed. Damn rpath held this up! :) Didn't realize that sourcekitten was looking for sourcekitd.framework under /Applications/Xcode.app/. Since I have multiple Xcode versions, there each under /Applications/<XCODE_VERSION>/Xcode.app/... to prevent conflicts. Made a symlink as a work around.

API doc can be seen here on the GitHub pages branch. It has issues (showing private entities, will file bug) as jazzy is still early in development, but it's nice nonetheless! :) Can add a copy to master branch in the future.

@beltex beltex closed this as completed Dec 14, 2014
@beltex
Copy link
Owner Author

beltex commented Dec 14, 2014

@beltex
Copy link
Owner Author

beltex commented Dec 19, 2014

Both issues addressed as of jazzy v0.0.17. Updated doc pushed.

@beltex
Copy link
Owner Author

beltex commented Dec 19, 2014

Next is tuple returns, they don't render correctly. Not sure if this is because there being documented incorrectly in source, or if it's something on jazzy's end. Xcode seems to handle them fine.

@beltex
Copy link
Owner Author

beltex commented Dec 23, 2014

How should a tuple return be documented? Normally it’s a single :returns: line, but since we have tuple returns now in Swift, should multiple :returns: lines be used? I couldn’t find an example in the Swift standard library (tuple return with any :returns: line). This is how jazzy currently handles it - example. Xcode handles it fine, but I’m not sure this is “correct” usage. Example code and Xcode render on option click below.

/**
...

:returns: valid True if the key is found, false otherwise
:returns: IOReturn IOKit return code
:returns: kSMC SMC return code
*/
public func isKeyValid(key: String) -> (valid: Bool, IOReturn: kern_return_t, kSMC: UInt8) {
...

xcode-comment

@beltex
Copy link
Owner Author

beltex commented Feb 15, 2015

Also, for reference, could use this as well in the future - https://github.com/SwiftDocOrg/swiftdoc-parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant