Commits
Tarun Sukhani authored 7e2203fc3c5
feat: OpenApiGenerator bean recursion into components/schemas (PF-97, release 1.13.14)
Replace the empty-ObjectSchema catch-all in OpenApiGenerator.classSchema()
with bean introspection. Public, non-static, non-transient fields become
schema properties via schemaFor(), preserving generics for nested beans
and collections. Each named bean is registered under components/schemas/
<name> and inlined at the call site as a $ref, so repeated references
share a single definition.
Cycle detection: the component name is reserved in componentNames before
descending into fields, so recursive references (e.g. Node.parent: Node)
short-circuit to a $ref instead of looping.
Filters: JPA enhancement leak fields (_persistence_*, __*), java-keyword
transient, simple-name @Transient, @JsonIgnore, @Expose(serialize=false).
Renames: @JsonProperty("name"), @SerializedName("name"). Required-flag
sources: @JsonProperty(required=true), @Schema(required=true),
@Schema(requiredMode=REQUIRED). Per-field @Schema enrichment: description,
example, format, pattern, nullable, deprecated, minimum, maximum.
JSON-library annotations are detected by simple-name + reflective
attribute reads so Jackson and Gson stay out of the framework's
compile-time deps; apps that don't use them pay nothing.
Stdlib classes (java.*, javax.*, jakarta.*) and anonymous classes
degrade to a plain ObjectSchema with no component registration.
Simple-name collisions resolve by first-come-first-serve on the
unqualified key; subsequent classes register under their canonical name.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>