Files
openapi/vector
zeekayandHanzo Dev f9ec999745 fix: make the document projectable into Java
The java row could not produce a client that compiles. Four separate causes,
all found by building the tree rather than reading it:

- library `native` is unusable at this spec size. Its oneof_model.mustache
  iterates the raw `oneOf` type-name set and emits `{{{.}}}.class`, which stops
  being legal Java the moment a variant is an array — `List<CloudEvent>.class`.
  Three schemas have an inline array in a oneOf, and that is 532 javac errors.
  Every other Java library iterates `composedSchemas.oneOf` and guards on
  `isArray`; okhttp-gson, jersey3 and apache-httpclient all compile. Still
  broken in 7.24.0, so it is not waiting on a version bump. okhttp-gson also
  puts the two JVM rows on one HTTP+JSON stack — kotlin is already okhttp4+gson.

- `skipFormModel` defaults to true, so the generator skips a multipart form
  model but still imports it from the API class that used it. edge_deployFunction
  offers octet-stream AND multipart, so FunctionsApi imported a class nobody
  emitted. generate.py now merges a per-row `global:` map into
  --global-property; only the java row sets it, because changing it for
  everyone would churn every other client's committed output.

- affiliates' `isAffiliate: {type: boolean, const: true|false}` projects as a
  single-member enum whose member is a String assigned to a Boolean field. The
  invariant moves into the description; the wire value is unchanged.

- vector's PointId is `oneOf: [integer, string+format:uuid]`, and inside a
  oneOf that format maps to java.util.UUID, on which the generator then calls
  UUID.validateJsonElement() — a method only its own models have. `format` is
  an annotation, not a constraint, so dropping it changes no wire value and the
  description still says what the field is.

The two spec edits are at the per-service source and re-woven, so merge.py does
not undo them: 2 insertions, 3 deletions in hanzo.yaml and nothing else.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-31 09:25:59 -07:00
..