Skip to content

feat(openapi-first): aggregate strategy by default + tool declarations

Akram GASSEM requested to merge feat/openapi-first-aggregate-default into main

v1.2.0. Make strategy: aggregate the default (per-module still available): one docs/api/openapi.yaml for the whole service, one into ${base-package}.api.

  • When per-module docs/api/.yaml files already exist, apply merges their paths + component schemas into the aggregate via yq, prefixing each module's paths with / so identically-named paths (e.g. /health) don't collide. Falls back to seeding a /health-per-module starter when yq is unavailable. This gives a pom that points at docs/api/openapi.yaml the file it expects instead of failing with "could not find openapi.yaml".
  • Declare contributes.tools { yq, jq } so labdev folds them into the workspace mise.toml and mise provisions them onto PATH before apply runs — no more "assume jq on PATH".
  • Strip CR from all jq scalars (not just modules): mise's native jq on Windows emits CRLF, which left e.g. strategy="aggregate\r". Use relative temp files under docs/api (not mktemp's /tmp) so a native-Windows yq can open them.

Merge request reports

Loading