Skip to content

Add hidden property to namespace objects #7

Open

Description

@Mpdreamz

Summary

Namespace objects in the cli-schema v1 meta-schema do not support a hidden property, but command objects and parameter objects both do. Adding hidden to namespaces would complete the symmetry and enable a useful pattern: marking an entire namespace as hidden from user-facing help while keeping it visible (or optionally hidden) in __schema output.

Use case

Some CLI tools register internal or automation namespaces (e.g. a release namespace used only by CI scripts) that should remain callable but should not clutter the --help output shown to end users. Tooling that reads __schema output — shell completions, SDK generators, documentation builders — should be able to suppress such namespaces the same way it already suppresses hidden commands and parameters.

Proposed change

Add a hidden boolean property (default false) to the namespace object schema, mirroring the existing definition on commands:

"hidden": {
  "type": "boolean",
  "default": false
}

This should apply at every level of namespace nesting (top-level namespaces and the recursive namespaces within each namespace item).

Context

The nullean/argh Argh CLI framework has added a [Hidden(Schema=true)] attribute that can be placed on a namespace handler class. It would emit hidden: true on the namespace object in __schema output, but this currently fails the schema-conformance CI check because the meta-schema rejects it as an additional property. We have temporarily suppressed the emission until the meta-schema supports it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions