com.vaadin.fusion.generator.
Class OpenAPISpecGenerator
- java.lang.Object
-
- com.vaadin.fusion.generator.OpenAPISpecGenerator
-
public class OpenAPISpecGenerator extends Object
A generator class that creates the OpenAPI specification file from the sources provided.
See Also:
-
-
Field Summary
Fields Modifier and Type Field and Description static String
APPLICATION_API_VERSION
static String
APPLICATION_TITLE
static String
DEFAULT_APPLICATION_API_VERSION
static String
DEFAULT_APPLICATION_TITLE
static String
DEFAULT_PREFIX
static String
DEFAULT_SERVER
static String
DEFAULT_SERVER_DESCRIPTION
static String
PREFIX
static String
SERVER
static String
SERVER_DESCRIPTION
-
Constructor Summary
Constructors Constructor and Description OpenAPISpecGenerator(Properties applicationProperties)
Creates the generator, getting the data needed for the generation out of the application properties.
-
Method Summary
All Methods Modifier and Type Method and Description void
generateOpenApiSpec(Collection<Path> sourcesPaths, ClassLoader classLoader, Path specOutputFile)
Generates the OpenAPI spec file based on the sources provided.
void
generateOpenApiSpec(Collection<Path> sourcesPaths, Path specOutputFile)
Generates the OpenAPI spec file based on the sources provided.
-
-
-
Field Detail
-
APPLICATION_TITLE
public static final String APPLICATION_TITLE
See Also:
-
APPLICATION_API_VERSION
public static final String APPLICATION_API_VERSION
See Also:
-
SERVER
public static final String SERVER
See Also:
-
SERVER_DESCRIPTION
public static final String SERVER_DESCRIPTION
See Also:
-
PREFIX
public static final String PREFIX
See Also:
-
DEFAULT_SERVER
public static final String DEFAULT_SERVER
See Also:
-
DEFAULT_SERVER_DESCRIPTION
public static final String DEFAULT_SERVER_DESCRIPTION
See Also:
-
DEFAULT_APPLICATION_TITLE
public static final String DEFAULT_APPLICATION_TITLE
See Also:
-
DEFAULT_APPLICATION_API_VERSION
public static final String DEFAULT_APPLICATION_API_VERSION
See Also:
-
DEFAULT_PREFIX
public static final String DEFAULT_PREFIX
See Also:
-
-
Constructor Detail
-
OpenAPISpecGenerator
public OpenAPISpecGenerator(Properties applicationProperties)
Creates the generator, getting the data needed for the generation out of the application properties.
Parameters:
applicationProperties
- the properties with the data required for the generation
-
-
Method Detail
-
generateOpenApiSpec
public void generateOpenApiSpec(Collection<Path> sourcesPaths, Path specOutputFile)
Generates the OpenAPI spec file based on the sources provided.
Parameters:
sourcesPaths
- the source root to be analyzedspecOutputFile
- the target file to write the generation output to
-
generateOpenApiSpec
public void generateOpenApiSpec(Collection<Path> sourcesPaths, ClassLoader classLoader, Path specOutputFile)
Generates the OpenAPI spec file based on the sources provided.
Parameters:
sourcesPaths
- the source root to be analyzedclassLoader
- the ClassLoader which is able to load the classes in sourcesPathsspecOutputFile
- the target file to write the generation output to
-
-