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

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected String
     
    protected String
     
    protected String
     
     

    Fields inherited from class io.inversion.action.misc.FileAction

    baseDir, files

    Fields inherited from class io.inversion.Rule

    ALL_METHODS, configMap, description, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order, params
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doGet(io.inversion.Request req, io.inversion.Response res)
     
    findTemplate(io.inversion.Request req)
     
    io.swagger.v3.oas.models.OpenAPI
    generateOpenApi(io.inversion.Request req)
     
     
     
     
     
    void
    serveOpenApi(io.inversion.Request req, io.inversion.Response res, String file)
     
    withOutputBaseDir(String outputBaseDir)
     
    withPatchesBaseDir(String patchesBaseDir)
     
    withTemplateBaseDir(String templateBaseDir)
     
     
    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.

    Methods inherited from class io.inversion.action.misc.FileAction

    canServe, findStream, getBaseDir, getFiles, serveFile, serveFile, withBaseDir, withFiles

    Methods inherited from class io.inversion.Action

    configureOp, doDelete, doPatch, doPost, doPut, getFullIncludePaths, getIncludePaths, isDecoration, joinPaths, joinPaths0, run, run0, withDecoration

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • templateBaseDir

      protected String templateBaseDir
    • patchesBaseDir

      protected String patchesBaseDir
    • outputBaseDir

      protected String outputBaseDir
    • writer

      protected OpenAPISpecWriter 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:
      doGet in class io.inversion.action.misc.FileAction<A extends OpenAPIAction>
      Throws:
      io.inversion.ApiException
    • serveOpenApi

      public void serveOpenApi(io.inversion.Request req, io.inversion.Response res, String file)
    • 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

      public String findTemplate(io.inversion.Request req)
    • getTemplateBaseDir

      public String getTemplateBaseDir()
    • withTemplateBaseDir

      public OpenAPIAction withTemplateBaseDir(String templateBaseDir)
    • getPatchesBaseDir

      public String getPatchesBaseDir()
    • withPatchesBaseDir

      public OpenAPIAction withPatchesBaseDir(String patchesBaseDir)
    • getOutputBaseDir

      public String getOutputBaseDir()
    • withOutputBaseDir

      public OpenAPIAction withOutputBaseDir(String outputBaseDir)
    • getWriter

      public OpenAPISpecWriter getWriter()
    • withWriter

      public OpenAPIAction withWriter(OpenAPISpecWriter writer)