Package io.inversion.action.openapi
Class OpenAPIAction<A extends OpenAPIAction>
java.lang.Object
io.inversion.Rule<A>
io.inversion.Action<A>
io.inversion.action.misc.FileAction<A>
io.inversion.action.openapi.OpenAPIAction<A>
- All Implemented Interfaces:
Comparable<A>
public class OpenAPIAction<A extends OpenAPIAction>
extends io.inversion.action.misc.FileAction<A>
https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started
https://javadoc.io/doc/io.swagger.core.v3/swagger-models/latest/index.html
https://mvnrepository.com/artifact/io.swagger.core.v3
https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-core
https://swagger.io/tools/open-source/open-source-integrations/
https://github.com/swagger-api/swagger-core
https://swagger.io/specification/
-
Nested Class Summary
Nested classes/interfaces inherited from class io.inversion.Rule
io.inversion.Rule.RuleMatcher -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected Stringprotected Stringprotected OpenAPISpecWriterFields inherited from class io.inversion.action.misc.FileAction
baseDir, filesFields inherited from class io.inversion.Rule
ALL_METHODS, configMap, description, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order, params -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoGet(io.inversion.Request req, io.inversion.Response res) findTemplate(io.inversion.Request req) io.swagger.v3.oas.models.OpenAPIgenerateOpenApi(io.inversion.Request req) voidserveOpenApi(io.inversion.Request req, io.inversion.Response res, String file) withOutputBaseDir(String outputBaseDir) withPatchesBaseDir(String patchesBaseDir) withTemplateBaseDir(String templateBaseDir) withWriter(OpenAPISpecWriter writer) io.inversion.json.JSNodewriteOpenAPI(io.inversion.Request req, io.swagger.v3.oas.models.OpenAPI openApi) Override me to manually edit the OpenAPI pojo before it is serialized to JSON OR to edit the JSNode model after it has been serialized.Methods inherited from class io.inversion.action.misc.FileAction
canServe, findStream, getBaseDir, getFiles, serveFile, serveFile, withBaseDir, withFilesMethods inherited from class io.inversion.Action
configureOp, doDelete, doPatch, doPost, doPut, getFullIncludePaths, getIncludePaths, isDecoration, joinPaths, joinPaths0, run, run0, withDecorationMethods inherited from class io.inversion.Rule
afterWiringComplete, checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludeMethods, getAllIncludePaths, getDefaultIncludeMatchers, getDescription, getExcludeMatchers, getIncludeMatchers, getName, getOrder, getParams, match, match, matches, matches, toString, withDescription, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withName, withOrder, withParam, withParams
-
Field Details
-
templateBaseDir
-
patchesBaseDir
-
outputBaseDir
-
writer
-
copyToOutputDirInDevMode
protected boolean copyToOutputDirInDevMode
-
-
Constructor Details
-
OpenAPIAction
public OpenAPIAction()
-
-
Method Details
-
doGet
public void doGet(io.inversion.Request req, io.inversion.Response res) throws io.inversion.ApiException - Overrides:
doGetin classio.inversion.action.misc.FileAction<A extends OpenAPIAction>- Throws:
io.inversion.ApiException
-
serveOpenApi
-
writeOpenAPI
public io.inversion.json.JSNode writeOpenAPI(io.inversion.Request req, io.swagger.v3.oas.models.OpenAPI openApi) Override me to manually edit the OpenAPI pojo before it is serialized to JSON OR to edit the JSNode model after it has been serialized.- Parameters:
openApi-- Returns:
- the JSNode representation of the OpenAPI JSON.
-
generateOpenApi
public io.swagger.v3.oas.models.OpenAPI generateOpenApi(io.inversion.Request req) -
findTemplate
-
getTemplateBaseDir
-
withTemplateBaseDir
-
getPatchesBaseDir
-
withPatchesBaseDir
-
getOutputBaseDir
-
withOutputBaseDir
-
getWriter
-
withWriter
-