Configuration examples should be complete, accurate, and ready to use without modification. This applies to both code snippets and configuration file examples.

For code examples that use configuration:

For configuration file examples:

Example of good practice:

# Complete example with imports
import os

# Configure Bearer authorization
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

Example of good configuration documentation:

{
  "name": "commit",
  "description": "Generate a commit message for staged changes",
  "params": { "includeUnstaged": true }
}

With explanation: “If includeUnstaged is set to true, then unstaged changes are also included in the prompt, otherwise only staged changes are included.”