Skip to content

Vimanam v0.5.0

Choose a tag to compare

@github-actions github-actions released this 21 Jun 19:36
· 27 commits to main since this release
27987b6

Added

  • --include-examples is now implemented: at --detail full it renders request
    and response examples as fenced JSON blocks, pulling from media-type example
    and examples and resolving $refs into components/examples. It previously
    printed only a placeholder (#6)
  • --group-by path groups endpoints by path, emitting one section per path with
    its methods listed underneath, in spec order (#8)
  • --max-tokens <N> fits output to a token budget: it renders at the requested
    --detail level and, if the estimated token count (a chars/4 heuristic) is
    over budget, steps the detail level down (full → standard → basic → summary)
    until it fits, reporting any reduction on stderr (#7)

Changed

  • The examples maps on media types and components.examples switched from
    HashMap to IndexMap, so rendered examples preserve spec order and keep the
    output-determinism guarantee

Fixed

  • --required-only now also drops parameters whose required is unspecified,
    not only those explicitly marked required: false
  • A requestBody given as a $ref (#/components/requestBodies/...) is now
    resolved during parsing; previously such specs failed to parse entirely
    because the referenced body carries no inline content

Internal

  • The ~1200-line markdown.rs was split into a markdown/ module (views,
    endpoint, schema, examples) behind the unchanged generate_markdown
    entry point, and shared preamble, endpoint-filter, HTTP-method-list, and
    JSON-pointer helpers were de-duplicated. No behavior change.
  • Example and MediaType gained #[serde(flatten)] extension maps, so
    unknown vendor (x-*) fields are preserved rather than dropped, matching the
    other model structs.

Binaries for Linux, macOS (Intel & Apple Silicon), and Windows are attached. Also available via cargo install vimanam.