Importing Style Guide

You can now create and manage custom style guides by importing Spectral rulesets. Rulesets in Spectral format may be in YAML, JavaScript, JSON, or pre-bundled in ZIP format. During import, you are prompted to name the new style guide. You can re-import a ruleset to replace an existing one, triggering validation. This enhancement ensures centralized and efficient control over API governance. SwaggerHub CLI now supports uploading and downloading rulesets, and Spectral rulesets now support the resolved: trueconfiguration.

Importing Style Guide

To import the style guide:

  1. Click Governance on the sidebar.

  2. Click Import Style Guide under Organization Style Guide .

  3. In the Import Style Guide dialog box, enter a style guide name and click Browse to select a style guide file.

    Note

    You can import Spectral style guides as a .yaml, .js or .json file or bundle them as a .zip folder. The .zip folder must contain a valid Spectral ruleset at the root and can reference other files and functions within the bundle.

  4. Click Import to upload the file.

    The list of imported style guides appears under the Organization Style Guide.

  5. Turn the Enable Style Guide toggle on or off next to the style guide name you want to enable or disable.

  6. Click the Edit or Delete icon to edit or delete a style guide.

  7. Click the Export icon to export a style guide.

Publication date: