Skip to content

docs: add a runnable config inspection example - #20

Merged
tisonkun merged 3 commits into
mainfrom
codex/add-config-inspection-example
Sep 1, 2026
Merged

docs: add a runnable config inspection example#20
tisonkun merged 3 commits into
mainfrom
codex/add-config-inspection-example

Conversation

@tisonkun

@tisonkun tisonkun commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a root-level, non-published serde-shape-examples workspace crate with an inspect_config example that prints an environment-variable reference for a fictional application configuration;
  • link the runnable example from the README with a relative source link;
  • remove the old configenv integration fixture because its Serde behaviors already have focused derive coverage.

Design notes

The example has its own local crate because showcase dependencies and targets should not affect the published serde-shape manifest. As a workspace member, it is still compiled and linted by the existing all-target workflow.

Environment naming and shape support remain example policy rather than public library API. The walker handles the small set used by the fictional model, detects recursive definitions, and rejects representations it cannot map faithfully.

The example contains no names, paths, or configuration details from private downstream repositories.

Validation

  • cargo run --package serde-shape-examples --example inspect_config
  • cargo x build
  • cargo x test
  • cargo x lint
  • cargo x package

A standalone example makes the downstream use case understandable without turning environment naming into library policy. Keep it in a non-published workspace crate so normal builds and lints still verify it.
Flattening, internal tagging, newtype variants, and field renames already have focused derive coverage. The runnable example now owns the end-to-end consumer story, so keeping this assertion bundle would duplicate behavior without protecting a distinct contract.
The runnable showcase has its own dependencies and release lifecycle. Keeping it in a non-published root workspace crate leaves the published serde-shape manifest focused while preserving workspace-wide build and lint coverage.
@tisonkun
tisonkun marked this pull request as ready for review September 1, 2026 16:29
@tisonkun
tisonkun enabled auto-merge (squash) September 1, 2026 16:29
@tisonkun
tisonkun merged commit 71f75a5 into main Sep 1, 2026
12 checks passed
@tisonkun
tisonkun deleted the codex/add-config-inspection-example branch September 1, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant