One important measurement for code quality is its documentation. This is especially the case for open source projects that count on the support of external developers and a strong community around the code base. With that in mind, here are some of the goals you should keep in mind when working within the Opencast codebase.

Package Level Documentation

Package documentation should cover the general concepts that are being used throughout the package, along with the principal interfaces and classes that are being used. A good example is provided by the Java 6 sql package description .

Where does the documentation go?

The package information should be put into a file called and reside in the root of the package. Generally, the package-info is a java class itself consisting of documentation and package declaration only. Documentation can be found here.


In order to achieve decent package documentation, make sure your documentation answers the following questions:


By looking at the documentation of a class or an interface, the developer should have a clear idea as to how the class can be used, what pitfalls there might be in terms of threading, performance etc. Again, a good example can be found in the Url class of the Java Development Kit.

Documentation Body



As with type documentation, the notes on a method should consist of instructions on what to expect in terms of behaviour when the method is called. Also, the user should be informed about any constraints that might apply to the objects state, the format of input parameters etc. As an example, take a look at the constructor for the URL class of the Java Development Kit.

Documentation Body


REST Endpoints

All Opencast REST endpoints must display HTML formatted documentation at the /docs path.

Please be sure that your documentation includes: