Package org.springdoc.scalar
Class AbstractScalarController
java.lang.Object
org.springdoc.scalar.AbstractScalarController
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 Summary
FieldsModifier and TypeFieldDescriptionprotected final StringThe Original scalar url.protected final com.scalar.maven.core.ScalarPropertiesThe Scalar properties.protected final SpringDocConfigPropertiesThe Spring doc config properties. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractScalarController(com.scalar.maven.core.ScalarProperties scalarProperties, SpringDocConfigProperties springDocConfigProperties) Instantiates a new Abstract scalar controller. -
Method Summary
-
Field Details
-
springDocConfigProperties
The Spring doc config properties. -
scalarProperties
protected final com.scalar.maven.core.ScalarProperties scalarPropertiesThe Scalar properties. -
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 propertiesspringDocConfigProperties- the spring doc config properties
-
-
Method Details
-
getScalarJs
@GetMapping({"/scalar.js","scalar.js"}) public org.springframework.http.ResponseEntity<byte[]> getScalarJs() throws IOExceptionGets 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 urlapiDocsPath- the api docs pathscalarPath- the scalar path- Returns:
- the docs
- Throws:
IOException- the io exception
-