Skip to content

Allow OpenAPI x-cli-config to declare the default command layout #401

Description

@saltbo

Problem

An API with stable OpenAPI tags cannot declare that Restish should initially generate tag-grouped commands. Users must configure command_layout: tags locally after connecting.

Proposed behavior

Support an API-level field in x-cli-config:

x-cli-config:
  command_layout: tags
  • accept flat and tags
  • validate remote values with the existing command-layout validator
  • apply the value during api connect
  • preserve explicit local configuration on reconnect
  • reapply the contract default only when replacement is requested
  • do not overwrite local layout during api sync
  • keep the setting API-level because command registration is API-level

Acceptance criteria

  • JSON and YAML documents parse the field
  • connecting persists a valid contract default
  • generated help uses the selected layout immediately
  • invalid values fail with a focused validation error
  • reconnect, replace, sync, and local-override precedence are covered
  • documents without the field retain existing behavior

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