-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Having an issue with ModelResolver
when resolving Array types
Say I have CustomObject.class, trying to resolve the schema of it's Array type class results in a Array schema with a reference
ModelResolver resolver = new ModelResolver(mapper).openapi31(true);
resolver.setSchemaResolution(SchemaResolution.INLINE);
context = new ModelConverterContextImpl(resolver);
context.resolve(new AnnotatedType().type(CustomObject[].class));
Resulting schema component:
{
"items": {
"$ref": "#/components/schemas/CustomObject"
},
type": "array"
}
SchemaResolution.INLINE doesn't inline these types. When I resolve a schema with that option, any properties that are array types on the class, ex: List, CustomObject[], get converted to Array reference schemas.
Is there anyways to generate fully inline Schemas when there are Array types? For SchemaResolution.INLINE, I would expect my above example to resolve as:
{
"items": {
"type": "object",
"properties": {
...
}
},
type": "array"
}
Metadata
Metadata
Assignees
Labels
No labels