-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to customize classes schemas in properties. #840
Conversation
@graemerocher Hi! could you merge and release this very important feature? |
these should be specified as annotation processor inputs otherwise the compiler will not pick up the changes if you change any of the values. |
@graemerocher Sorry, I didn't understand what you mean. My idea is that you specify in the configuration which classes in the API structure you want to replace with other classes. The compiler is not required for this action, all class structures are loaded from the context. In addition, I tested all these changes locally on my project. I still don't understand what could be the problem. |
in general this module does have problems with incremental compile since everything seems to be configured via |
Hmm... Could you show an example how to check if you are right or not. And maybe you can suggest how to fix this problem. In general, this feature turned out to be really very important. In my project, I ran into the problem of generating |
@graemerocher Hi! So what do you end up suggesting? This feature is very important and without it at the moment it is impossible to work with the generated files. If there are suggestions on how to improve my solution - no problem, I will do it. |
Looks like the feature is missing documentation in general, so please add documentation and in the documentation state that changing the configuration requires a full recompile. Thanks. |
@graemerocher done |
@graemerocher Hi! Sorry to rush, but this feature is really very important. In addition, I found a small bug and it can also be included in the release. Could you merge everything and release it? |
since this is a new feature could you bump the minor version and update the target branch to 3.8.x Thanks |
@graemerocher done! |
Now you can set custom classes to create different open api schemas for selected classes:
or by system properties:
or by
openapi.properties
Also It can be used for replace classes schema with generics, for example, if you use jaxb generated classes and have custom serializer for JAXBElement class (see tests). And you can set cutom schemas for different type args. For example if you have this classes structure:
You can customize classes structure for openapi schema:
And set openapi properties to map classes to custom openapi schema classes:
Fixed #654