Skip to content

Schema inspection support for interface and union types #924

Closed
@rstoyanchev

Description

@rstoyanchev

Currently schema inspection relies on a one-for-one match between a schema field type and a controller method return type, and that doesn't extend well to interfaces and unions as the Java types used at runtime are unknown.

We can provide support for inspection of unions and interfaces with a little bit of help from application to resolve Java types. We can navigate schema interface type hierarchies and union member types, and resolve corresponding Java types with the help of a resolver that does the reverse of what TypeResolver does. A default implementation for such a resolver can look for matching Java types under a given root package. We can also use any Java to schema type registrations that are provided in ClassNameTypeResolver.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions