Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

documented only some pods #70

Closed
khaledbohout2 opened this issue Apr 10, 2020 · 4 comments
Closed

documented only some pods #70

khaledbohout2 opened this issue Apr 10, 2020 · 4 comments
Labels
question Further information is requested

Comments

@khaledbohout2
Copy link

khaledbohout2 commented Apr 10, 2020

hey, it worked for me and generated this html file which is probably
documentation for some pods and third party libraries and can not find any of my classes (models, view , presenters) , i even searched for some code in the documentation and could not find it in my code

image

@khaledbohout2 khaledbohout2 changed the title it only documents alamo fire and other third party ibrariesin the project it only documents network layer Apr 10, 2020
@khaledbohout2 khaledbohout2 reopened this Apr 10, 2020
@khaledbohout2 khaledbohout2 changed the title it only documents network layer generates only some pods Apr 10, 2020
@khaledbohout2 khaledbohout2 changed the title generates only some pods documented only some pods Apr 10, 2020
@mattt mattt added the question Further information is requested label Apr 10, 2020
@mattt
Copy link
Contributor

mattt commented Apr 10, 2020

Currently, documentation is generated for only public declarations (public or open modifiers). Assuming that you aren't embedding dependencies alongside your source files, I would recommend specifying a more specific path to exclude vendored code.

@khaledbohout2
Copy link
Author

so i can not document the wole project ? if i want to document the whole project i will make standalone documentation for each class!? although i tried specifying a more specific path to exclude vendored code and did not find any thing in documentation folder , it is empty

@mattt
Copy link
Contributor

mattt commented Apr 10, 2020

You can indeed generate documentation for your whole project all at once; my point was that you'd probably want to limit to your own code, and not 3rd party dependencies (e.g. nothing in the Pods directory).

If documentation for your own classes aren't showing up, it's most likely because they aren't declared with public or open modifiers. By default, declarations have an implicit internal access level, and those aren't currently emitted by swift-doc.

For example, if you have a view controller, like:

/// Documentation for MyViewController
class MyViewController: UIViewController { ... }

You should make add a public access modifier:

/// Documentation for MyViewController
public class MyViewController: UIViewController { ... }

@mattt
Copy link
Contributor

mattt commented Jul 31, 2020

This feature is tracked by #72.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants