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 Dec 18, 2020. It is now read-only.
William Gardiner edited this page Mar 6, 2019
·
5 revisions
SwaggerGen Annotations
We have created a custom set of Java annotations and using Reflection within Java, we can read through a project importing these to generate Swagger documentation.
Data
This solution accomplishes it's functionality through a series of parsers and translators, that read data from the input space (annotations, JSON schemas, and config files) and maps that same information to the output space (a Swagger file). The different formats that the data take along the way are described here:
Domain
The domain describes the Java objects that provide no functionality, but act as containers for the data being acted upon by the rest of the system.
Input
Items in the input domain are Java objects constructed to match the structure of the data coming in.
A JSON Schema is a JSON file the describes the format of other JSON files. The JsonSchema is a Java representation of that JSON file.
Output
Items in the output domain are Java objects constructed to match the structure of the data going out.
The Path object stores all of the data that Swagger uses to describe a path. It is structured to use the same format as a Swagger file so that it can be easily written to a YAML or JSON Swagger file.
The Content object represents the contents of a body of a request. This in the output domain equivalent of the JsonSchema object.
Solution Structure
The package diagram below describes the intended purpose of each component. Data flows from input to output with each of the various components acting when appropriate.