AlexGuironnetRTE / opfab-apis

Experimentations regarding code and doc generation for OperatorFabric APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

opfab-apis

Experimentations regarding code and doc generation for OperatorFabric APIs

Structure

  • current : This folder contains the classes generated under client and services in the operatorfabric-core repo (revision 42485d714f2d20b2e75cc88479d004c44a9ffaf5)

Interesting generators

Server
Documentation

TODO

Look into adoc doc generation Global properties vs config.json file? Compare existing "custom" templates with standard Look into disallowAdditionalPropertiesIfNotPresent

Remove swagger annotations (currently done with custom generator) ⇒ not doable at the moment

Couldn’t we just remove the templates that we don’t need (or don’t need to customize)?

Notes

Current generation

Card model classes exist under 3 different packages (org.opfab.cards, org.opfab.cards.consultation, org.opfab.cards.publication)

Experimentation

Looking at EntitiesAPI

delegatePattern: true ⇒ generates XXXApi class with _someMethod() bearing the controller annotations and calling someMethod() (which is meant to be overridden). That’s how it’s done in current generation. Maybe we would lose the annotations when implementing the interface otherwise?

useBeanValidation: true or absent adds the @Validated annotation and (import javax.validation.Valid; import javax.validation.constraints.*;) useBeanValidation is set to true in current generation yet annotation and imports are not present ⇒ maybe taken out of template?

About

Experimentations regarding code and doc generation for OperatorFabric APIs

License:Mozilla Public License 2.0


Languages

Language:Java 100.0%