Package io.apicurio.hub.api.codegen
Class OpenApi2Thorntail
- java.lang.Object
-
- io.apicurio.hub.api.codegen.OpenApi2JaxRs
-
- io.apicurio.hub.api.codegen.OpenApi2Thorntail
-
public class OpenApi2Thorntail extends OpenApi2JaxRs
Class used to generate a Thorntail JAX-RS project from an OpenAPI document.- Author:
- eric.wittmann@gmail.com
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.apicurio.hub.api.codegen.OpenApi2JaxRs
OpenApi2JaxRs.JaxRsRuleFactory
-
-
Field Summary
-
Fields inherited from class io.apicurio.hub.api.codegen.OpenApi2JaxRs
config, document, mapper, openApiDoc, postProcessor, settings, updateOnly, utf8
-
-
Constructor Summary
Constructors Constructor Description OpenApi2Thorntail()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgenerateAll(CodegenInfo info, StringBuilder log, ZipOutputStream zipOutput)Generates all of the content for storage in the ZIP.protected StringgenerateJavaInterface(CodegenInfo info, CodegenJavaInterface _interface)Generates a Jax-rs interface from the given codegen information.protected StringgenerateJaxRsApplication()Generates the JaxRsApplication java class.protected CodegenInfogetInfoFromApiDoc()Processes the OpenAPI document to produce a CodegenInfo object that contains everything needed to generate appropriate Java class(es).-
Methods inherited from class io.apicurio.hub.api.codegen.OpenApi2JaxRs
classnameToUri, findMatchingBean, generate, generate, generatePomXml, generateReactiveTypeName, generateTypeName, getContextRoot, getResource, getResourceName, getSettings, isUpdateOnly, javaPackageToZipPath, paramNameToJavaArgName, preProcess, schemaRefToFQCN, setOpenApiDocument, setOpenApiDocument, setOpenApiDocument, setSettings, setUpdateOnly, toStringArrayLiteral
-
-
-
-
Method Detail
-
generateAll
protected void generateAll(CodegenInfo info, StringBuilder log, ZipOutputStream zipOutput) throws IOException
Description copied from class:OpenApi2JaxRsGenerates all of the content for storage in the ZIP. Responsible for generating all classes and other resources that make up the generated project.- Overrides:
generateAllin classOpenApi2JaxRs- Throws:
IOException- See Also:
OpenApi2JaxRs.generateAll(io.apicurio.hub.api.codegen.beans.CodegenInfo, java.lang.StringBuilder, java.util.zip.ZipOutputStream)
-
generateJaxRsApplication
protected String generateJaxRsApplication() throws IOException
Generates the JaxRsApplication java class.- Overrides:
generateJaxRsApplicationin classOpenApi2JaxRs- Throws:
IOException
-
generateJavaInterface
protected String generateJavaInterface(CodegenInfo info, CodegenJavaInterface _interface)
Generates a Jax-rs interface from the given codegen information.- Overrides:
generateJavaInterfacein classOpenApi2JaxRs- Parameters:
info-_interface-
-
getInfoFromApiDoc
protected CodegenInfo getInfoFromApiDoc() throws IOException
Description copied from class:OpenApi2JaxRsProcesses the OpenAPI document to produce a CodegenInfo object that contains everything needed to generate appropriate Java class(es).- Overrides:
getInfoFromApiDocin classOpenApi2JaxRs- Throws:
IOException
-
-