Use this when documenting the parameters an automation accepts.
Inputs · Automation Documentation
Documenting inputs lists every parameter, its type, allowed values, default and whether it is required, so users know exactly what to provide.
1. Document inputs precisely.
2. Generate from code where possible (terraform-docs, ansible-doc).
3. Examples.
4. Constraints.
5. Keep in sync.
code definitions → generated input docs
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Verification compares documentation to executable reality. Enumerate runtime/schema inputs and show each appears in the documentation with matching name/type/required/default semantics. Parse and validate every published request/example with the production validator, including at least one intentionally invalid example that demonstrates the expected error shape. If the automation exposes CLI, API and UI front ends, confirm they map to the same canonical internal input rather than documenting three subtly different contracts. For changes, run a compatibility fixture set from previous documentation versions. Finally execute a safe accepted example through the real path and correlate the normalized request with target read-back. This keeps documentation from becoming an attractive but untested parallel specification.
Step 2 Common mistakes Narrow the fault
- Inputs documented without types or allowed values.
Step 3 Where it fails Narrow the fault
Separate documentation accuracy, schema accuracy and runtime semantics. Documentation can faithfully describe a schema that the application does not actually enforce; the schema can be correct while an API layer coerces values before validation; and a fully valid request can still fail target preconditions. Do not fix a runtime mismatch by editing only prose. Identify which artifact is authoritative for each property, reconcile the executable contract first, then regenerate/update documentation and fixtures. Likewise, do not include environment-specific secret or target values in examples just to make them executable. Preserve versioned schema, generated reference and validated examples together, and rerun consistency checks whenever the input contract changes.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Name, type, allowed values, default, required.
- Match the code's validation.
- Show an example.
- Input reference (name, type, required, default, example) — contract
- Generated docs (argument_specs, terraform-docs) — accuracy
- Validation rules documented — constraints
ReferenceWhy it matters1 section · depth on demand
In depth
Input documentation describes every parameter an automation accepts: name, meaning, type, allowed values, default, and examples — so people can run it correctly without reading the code.
| Field | Example |
|---|---|
| Name | vlan_id |
| Description | VLAN to create on access switches |
| Type/range | Integer 2–4094 |
| Required | Yes |
| Default | — |
| Example | 120 |
Generate the documentation from the same schema that validates inputs (argument specs, JSON Schema, PowerShell parameter help), so documentation and validation never disagree.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
Automation input documentation is part of the interface contract, not prose that can safely drift away from runtime validation. For every input, documentation should state canonical name, purpose, type/shape, required or optional status, default behavior, allowed/range/pattern constraints, units, sensitivity, source/precedence and at least one representative example. A machine-readable schema can anchor many of those fields and enable generated/reference documentation, but semantic prerequisites and operational consequences still need human explanation. Documentation must also distinguish omitted, null/empty and explicit default values when runtime behavior differs. For nested objects or lists, document element structure and stable identifiers instead of relying on an untyped 'JSON blob' description. The reader should be able to predict what validation will accept before invoking the automation.
ReferenceConfiguration & state1 section · depth on demand
Lifecycle
Version documentation with the automation/input schema and make interface changes part of normal code review. Where feasible, generate tables/examples from the same schema metadata the validator consumes so names and types cannot diverge silently. Mark deprecated inputs and their replacement, define removal windows, and keep old examples out of the primary path once they stop validating. Secret inputs should explain how to reference/provide the secret without ever showing a real value. If defaults are environment-dependent or computed, document the selection rule rather than a misleading fixed value. Add documentation checks to CI: every example should parse and validate, every required schema property should appear in the reference, and undocumented inputs should fail the quality gate.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation Documentation > Inputs. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://json-schema.org/specification · confidence 94%Quick lookup tables
Automation Documentation → Inputs · operational reference
Context-specific ownership, verification, output and failure-boundary lookup for Automation Documentation → Inputs.
| Layer | Automation Documentation → Inputs operational reference |
|---|---|
| Context identity | JSON Schema 2020-12 / automation documentation + exact revision/input/target identity |
| Persistent intent | Versioned contract/configuration with explicit ownership and prerequisites |
| Verification | Validate inputs/read current state → exercise bounded operation → independent target read-back |
| Output contract | Preserve structured status/IDs/properties before human formatting |
| Failure boundary | Separate source/input/engine/controller execution from downstream target outcome |
Deep reference
Healthy vs suspicious evidence
Output interpretation
The most useful documentation output is a structured reference table or generated schema view plus validated examples. Show types and defaults explicitly and use code blocks that can be copied without hidden placeholders that accidentally look literal. Validation error examples should identify field path and rule without exposing secrets. Documentation build/CI should report orphaned schema properties, undocumented fields, invalid examples and stale/deprecated references as actionable failures. For generated docs, include the schema/application version so readers can tell which runtime contract is represented. A green docs build shows consistency with the declared schema, not production success, so keep operational verification separate. This output discipline turns documentation quality into a reproducible contract rather than a manual spot check.