Description
Implement the primary CLI entry point for documentation. The command should guide the user from a list of subsystems down to specific type details.
Acceptance Criteria:
ocm describe types (level 0): Lists subsystems in a table.
ocm describe types <subsystem> (level 1): Shows guides and lists available types.
ocm describe types <subsystem> <type> (level 2): Full schema documentation.
TextRenderer providing a high-quality ANSI-styled terminal output.
Example for output of ocm describe types input-method file for inspiration:
================================================================================
TYPE: file
ALIAS: v1/file
SYSTEM: input-method (Resource/Source Input Methods)
SOURCE: Core OCM
================================================================================
DESCRIPTION:
The 'file' input method ingests a single file from the local filesystem.
It is the most common way to add simple artifacts to an OCM component.
--------------------------------------------------------------------------------
GUIDES & USAGE
--------------------------------------------------------------------------------
GUIDE: Basic Usage in component-constructor.yaml
Summary: How to use the 'file' input method to add a text file resource.
Section: Configuration Structure
Content:
Specify 'type: file' and provide the relative 'path' to the file.
Example (ocm.yaml):
resources:
- name: readme
type: plainText
input:
type: file
path: ./README.md
Section: Compression
Content:
Set 'compress: true' to automatically GZip the file during ingestion.
Example (ocm.yaml):
input:
type: file
path: ./large-data.bin
compress: true
--------------------------------------------------------------------------------
SCHEMA FIELDS (JSON Schema 2020-12)
--------------------------------------------------------------------------------
Field Name Type Req Description
---------- ---- --- -----------
path string [x] Path to the file relative to the working dir.
compress boolean [ ] Whether to compress the blob (default: false).
mediaType string [ ] Optional custom media type for the resulting blob.
exclude []string [ ] Glob patterns to exclude (if path is a directory).
--------------------------------------------------------------------------------
EXAMPLES
--------------------------------------------------------------------------------
$ ocm add component-version --constructor component-constructor.yaml
================================================================================
Done Criteria
Description
Implement the primary CLI entry point for documentation. The command should guide the user from a list of subsystems down to specific type details.
Acceptance Criteria:
ocm describe types(level 0): Lists subsystems in a table.ocm describe types <subsystem>(level 1): Shows guides and lists available types.ocm describe types <subsystem> <type>(level 2): Full schema documentation.TextRendererproviding a high-quality ANSI-styled terminal output.Example for output of
ocm describe types input-method filefor inspiration:Done Criteria