...
Just replace 'YOUR_CLASS' with an appropriate DTO (usually *Response or *Request classes)Usually code above is generated automatically during api generation through JBT (see api-generate) but such behavior can be changed. To turn off stub generation <strong>#TODO end this paragraph</strong>
Usage in JBT
Usually StubFactory is used during API generation through JBT. It produces interfaces in com.knubisoft.api.spec with or without default implementation with StubFactory.
To generate API layer without StubFactory (usual interfaces) use the following command from the project's root directory:
Code Block |
---|
cmd/template generate api |
To generate API layer with StubFactory usage (default method with StubFactory in interfaces) use the following command from the project's root directory:
Code Block |
---|
cmd/template generate api-stub |
MockDataGenerator
...
Overview
...