Class | Description |
---|---|
AbstractJsonSource |
This class gathers the common behavior to represent JSON sources.
|
AnnotationHelper |
This class provides some helper methods to fill in the metadata in the discovered models.
|
CoreographyBuilder |
This class generates a sequence diagram describing how two JSON-based Web APIs can be composed.
|
JsonAdvancedDiscoverer |
Performs a discovery process among several
JsonSource s (i.e., receiving a
JsonSourceSet as input). |
JsonComposer |
This class composes a set of ecore models representing JSON-based apis.
|
JsonData |
Simple class to keep track of the data of a particular call to a JSON service.
|
JsonInjector |
This class performs the injection process (obtaining models from JSON files)
In the context of the JSON discoverer, the
JsonInjector is used to represent the
data model of a JSON-based Web service during the Simple discovery process. |
JsonSimpleDiscoverer |
This class is used to discover/refine metamodels (as
EPackage elements)
from JSON documents (i.e., json file). |
JsonSource |
This class represents a JSON source.
|
JsonSourceSet |
This class is used to represent a set of
JsonSource elements. |
SingleJsonSource |
This class extends JsonSource class and only allows for JSON sources
with ONE JSON document and WITHOUT input.
|
Main classes for the JSON discoverer.
The main classes included in this package are shown in the figure below.
The pacakge defines a set of classes to represent JSON documents (see AbstractJsonSource
hierarchy)
returned by JSON-based Web services. They are called JSON sources and range from single JSON documents
(i.e., SingleJsonSource
) to a set of them (i.e., JsonSourceSet
).
JSON sources can also define the input of the service (i.e., withInput
) if it is given as a
JSON document. The parsing and management of JSON data is performed by using the
GSON library.
The main functionalities provided by the tool are implemented in their corresponding classes. The simple
discoverer is implemented by the classes JsonSimpleDiscoverer
and JsonInjector
,
which provide the discovery of the schema and the data model, respectively. The advanced discoverer is implemented
by the classes JsonAdvancedDiscoverer
. Finally, the API composer is implemented by the class
JsonComposer
.
Other classes not included in the Figure for the sake of simplicity are in charge of managing the coverage information, the management of models (i.e., loading and saving) and the sequence diagram generator.
Our solution leverages on the modeling technology to represent the API schemas and the data models. In particular, the tool uses the Eclipse Modeling Framework (EMF).