Skip to content

docs(schema): document infrahubctl schema format (blocked on SDK release) - #10088

Open
petercrocker wants to merge 1 commit into
stablefrom
docs/infrahubctl-schema-format
Open

docs(schema): document infrahubctl schema format (blocked on SDK release)#10088
petercrocker wants to merge 1 commit into
stablefrom
docs/infrahubctl-schema-format

Conversation

@petercrocker

@petercrocker petercrocker commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

DO NOT MERGE until an infrahub-sdk release that ships infrahubctl schema format is published. The feature is merged in opsmill/infrahub-sdk-python#1189 but is not in the currently released CLI (stable ships 1.22.2). Merging earlier would document a command users can't run yet. Kept as a draft until then.

What

Adds a Format schema files section to docs/docs/schema/create-and-load.mdx, documenting the new infrahubctl schema format command as a sibling of the existing schema check / schema load operations.

Where and why

schema format is a schema operation (something you do to your schema files), so the narrative belongs in Schema & Data → Schema operations, on the page that already covers check/load. The section sits before "Check a schema" to match the real workflow order (write → format → check → load). The per-flag reference stays canonical in the auto-generated infrahubctl-schema page; this page links out to it rather than duplicating the option table.

Contents

  • Default behaviour: reorders keys only, preserves comments/quoting/inline sequences, leaves Infrahub-reserved namespaces untouched, runs offline.
  • --diff (preview) and --check (exit non-zero if any file would change; suitable for pre-commit / CI).
  • The three opt-in flags: --strip-defaults, --sort-by-order-weight (cross-linked to the Order weight page), --backfill-order-weight.
  • Links to the infrahubctl schema reference via the standard $(base_url) convention.

Checks

Vale, markdownlint, and link targets all pass.

Review in cubic

Add a "Format schema files" section to the Create and load schema page:
default key-ordering behaviour, --diff / --check, and the opt-in
--strip-defaults / --sort-by-order-weight / --backfill-order-weight flags.

DO NOT MERGE until an infrahub-sdk release that ships `infrahubctl schema
format` is published (feature merged in opsmill/infrahub-sdk-python#1189).
Merging earlier would document a command absent from the released CLI.
@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label Jul 30, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. This PR adds only documentation for a future CLI command. No code, behavior, or operational changes. The change is bounded and clearly beneficial.

Re-trigger cubic

@petercrocker
petercrocker marked this pull request as ready for review July 30, 2026 13:03
@petercrocker
petercrocker requested review from a team as code owners July 30, 2026 13:03
@petercrocker
petercrocker removed request for a team July 30, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant