Class AbstractScalarController

java.lang.Object
org.springdoc.scalar.AbstractScalarController

public abstract class AbstractScalarController extends Object
The type Abstract scalar controller.
Author:
bnasslahsen This is a copy of the class ScalarController from the scalar webjar. It has been slightly modified to fit the springdoc-openapi code base.
  • Field Details

    • springDocConfigProperties

      protected final SpringDocConfigProperties springDocConfigProperties
      The Spring doc config properties.
    • scalarProperties

      protected final com.scalar.maven.core.ScalarProperties scalarProperties
      The Scalar properties.
    • originalScalarUrl

      protected final String originalScalarUrl
      The Original scalar url.
  • Constructor Details

    • AbstractScalarController

      protected AbstractScalarController(com.scalar.maven.core.ScalarProperties scalarProperties, SpringDocConfigProperties springDocConfigProperties)
      Instantiates a new Abstract scalar controller.
      Parameters:
      scalarProperties - the scalar properties
      springDocConfigProperties - the spring doc config properties
  • Method Details

    • getScalarJs

      @GetMapping({"/scalar.js","scalar.js"}) public org.springframework.http.ResponseEntity<byte[]> getScalarJs() throws IOException
      Gets scalar js.
      Returns:
      the scalar js
      Throws:
      IOException - the io exception
    • getDocs

      protected org.springframework.http.ResponseEntity<String> getDocs(String requestUrl, String apiDocsPath, String scalarPath) throws IOException
      Gets docs.
      Parameters:
      requestUrl - the request url
      apiDocsPath - the api docs path
      scalarPath - the scalar path
      Returns:
      the docs
      Throws:
      IOException - the io exception