You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 16, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 16, 2025. It is now read-only.
I have a read only part of an API where the content has no schema. At this point a Javascript anyor Java Object would be the appropriate representation. Looking for the OpenApi specification for that, an empty schema seems to be the right definition (see SO https://stackoverflow.com/a/43328994/12890):
components:
schemas:
AnyValue: {}
Doing so this type is not generated nor replaced by Object, it is simply not handled. Even an explicit type mapping (to java.lang.Object e.g.) is ignored so the generated code is not compiling.
The only work around I found looks like this (I don't need array):
Activity
hauner commentedon Apr 14, 2022
The empty
schemais a weak spot. I have to look at it.That the mapping does not work is unexpected. I wonder what's going wrong there.
#92, test case
#92, improve naming
#92, support type mapping
#92, run integration test
hauner commentedon Apr 18, 2022
it is now possible and necessary to add a type mapping for this case.
That the processor does not generate code for the empty schema is caused by another case that must not generate a class.
Nothing I want to touch right now, so I just added the missing mapping possibility for now.
hauner commentedon Apr 19, 2022
released in
io.openapiprocessor:openapi-processor-spring:2022.3aburmeis commentedon Apr 19, 2022
Works now with 2022.3, thank you!