webapp-scaffold/bin
Uwe Schuster 4c4d52e3de postprocess-openapi: strip empty required: [] arrays
oatpp 1.3 emits `"required": []` on schemas with no required fields.
OpenAPI 3.0.x rejects this with "must NOT have fewer than 1 items",
which silently breaks strict consumers. Orval's typed fetch client
swallowed it (the violation surfaces only as a non-fatal warning), but
Orval's Zod generator (added downstream in fewo-webapp's #469 increment 2)
fails hard:

  must NOT have fewer than 1 items at /components/schemas/<DTO>/required
  must have required property '$ref'                  at /components/schemas/<DTO>
  must match exactly one schema in oneOf              at /components/schemas/<DTO>

83 of fewo-webapp's 198 DTOs trip this. Stripping the empty array (absence
of the keyword has the same semantics) is the spec-compliant fix.

Bumps to v0.4.1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 21:22:30 +02:00
..
fetch-openapi.sh #2: fetch-openapi.sh — pass $OUT via sys.argv, not f-string in heredoc 2026-04-25 21:34:02 +02:00
inject-hashed-filenames.py #3: inject-hashed-filenames.py — tag-aware HTML rewrite 2026-04-25 21:38:19 +02:00
postprocess-openapi.py postprocess-openapi: strip empty required: [] arrays 2026-05-05 21:22:30 +02:00