-
Notifications
You must be signed in to change notification settings - Fork 12
API requirements should be generated #53
Comments
Current plan: Adding a new annotation to annotate input/output/parameter interfaces in the API. Then, after building the API, a custom sbt task with own class loader loads the API.jar, scanns for annotated interfaces and freshly generates the Input/Output/Parameter Requirement classes, e.g. https://github.com/codeoverflow-org/chatoverflow-api/blob/master/src/main/java/org/codeoverflow/chatoverflow/api/plugin/configuration/Input.java Then, the API is built again with the new files (which are also commited, still beeing artefacts). Comments? @joblo2213 @daniel0611 |
I think it's fine, no objections. |
👍 |
Okay, I need help here: Everything is annotated and I integrated a annotation inspection in the compile process. The idea is to read the generated files, get all annotated interfaces through reflection, generated the files and build again. But I'm not able to import the dependencies correctly. Solutions? @daniel0611 |
Sure, I'll look into it tomorrow. |
Apparently libraryDependencies += "org.reflections" % "reflections" % "0.9.11" And after a reload in IntelliJ you can import the added dependency successfully. |
Done! This was a great one. |
Besides writing an Input or Output inside the API project for a new platform source, these in/outputs have also to be registered inside the API. There should be a solution, generating this files, since their content holds no new information.
Another idea would be overloading methods.
See, e.g.: https://github.com/codeoverflow-org/chatoverflow-api/blob/master/src/main/java/org/codeoverflow/chatoverflow/api/plugin/configuration/Input.java
The text was updated successfully, but these errors were encountered: