Junos Space SDK > Developer Guides > Junos Space Application Developer Guide > Programming with the Junos Space SDK > Using the Junos Space SDK Plug-in > Using the EJB-REST Wizard > REST Wizard Documentation Guide

Generating and Exporting REST Documentation

Generating REST Documentation

After you have created the content for the documentation of your resources using the REST Wizard, you can generate your documentation by doing the following:

  1. Select JunosSpace > Generate REST Documentation.

  2. On the dialog that displays, select the resource or resources for documentation in the Existing REST Resources column.

  3. Click the > button to move the resources to the Resource To Document column.

  4. Optionally, select the One page per resource? checkbox.

    Select this option when you have services that have the same context root and service root and you want them to appear separately in the documentation. For example, if the services Job Management and Job Manager have the same context root and service root, they will display as separate entries in the table on the REST API Services page. For more information about context and service roots, see Resource Paths in the Application Developers Guide.

  5. Click OK. When a message displays indicating that document generation has completed, click OK again.

    A page displays with a UML diagram of your resource or resources:

  6. Optionally, you can rearrange the components of the UML diagram.

  7. Click Finish.

  8. View the documentation by doing the following steps:

    1. Select Help > Help Contents from the Eclipse menu.

    2. When Eclipse help opens, select Dynamic REST Application Guide in the navigation pane. (Note that if you have the documentation scope limited, you might not be able to see this top-level node in the navigation pane).

    3. Select either of the following:

      • REST API Services—Provides the documentation for your services and methods.
      • REST API Resource Models—Provides the reference documentation for your resources.

Exporting REST Documentation

You can export your REST documentation as an archive or a plugin.

Exporting REST Documentation as an Archive

To export your documentation as an archive after you have generated the documentation:

  1. Select JunosSpace > Export REST Documentation Archive.
  2. Enter the path and file name for where you want your archive exported or click Browse to select a directory.
  3. Click Export.

    Your documentation is exported as a .zip file.

Exporting REST Documentation as an Eclipse Plugin

To export your documentation as a plugin after you have generated the documentation:

  1. Select JunosSpace > Export REST Documentation Plugin.

  2. On the dialog, enter:

    • The name of the plugin. For example, Junos.Space.Services.
    • The version number of your plug-in cannot be changed.
    • The directory where the plugin will be exported.
  3. Click the Export button.