Class GeneralDownloadSpecV1
java.lang.Object
com.kingsrook.qqq.middleware.javalin.specs.AbstractEndpointSpec<GeneralDownloadInput,GeneralDownloadResponseV1,GeneralDownloadExecutor>
com.kingsrook.qqq.middleware.javalin.specs.v1.GeneralDownloadSpecV1
public class GeneralDownloadSpecV1
extends AbstractEndpointSpec<GeneralDownloadInput,GeneralDownloadResponseV1,GeneralDownloadExecutor>
Spec for the general file download endpoint (GET /download/{file}).
This endpoint returns binary file content from server-side storage.
-
Field Summary
Fields inherited from class com.kingsrook.qqq.middleware.javalin.specs.AbstractEndpointSpec
qInstance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildInput(io.javalin.http.Context context) build the endpoint's input object from a javalin contextBinary download endpoints do not return a JSON schema.voidhandleOutput(io.javalin.http.Context context, GeneralDownloadResponseV1 output) Override handleOutput to stream binary content rather than JSON.Methods inherited from class com.kingsrook.qqq.middleware.javalin.specs.AbstractEndpointSpec
checkCredentialScopeOperation, customizeMethod, defineAdditionalBasicResponses, defineBasicSuccessResponse, defineCompleteOperation, defineMethod, defineRequestBody, defineRoute, getOperationId, getRequestBodyAsJsonObject, getRequestParam, getRequestParamInteger, getRequestParamMap, handleException, isSecured, newExecutor, newOutput, serveRequest, setQInstance
-
Constructor Details
-
GeneralDownloadSpecV1
public GeneralDownloadSpecV1()
-
-
Method Details
-
defineBasicOperation
-
defineRequestParameters
-
buildInput
Description copied from class:AbstractEndpointSpecbuild the endpoint's input object from a javalin context- Specified by:
buildInputin classAbstractEndpointSpec<GeneralDownloadInput,GeneralDownloadResponseV1, GeneralDownloadExecutor> - Throws:
Exception
-
defineComponentSchemas
-
defineResponses
Binary download endpoints do not return a JSON schema. Override to describe the response as application/octet-stream binary content. -
handleOutput
public void handleOutput(io.javalin.http.Context context, GeneralDownloadResponseV1 output) throws Exception Override handleOutput to stream binary content rather than JSON.- Overrides:
handleOutputin classAbstractEndpointSpec<GeneralDownloadInput,GeneralDownloadResponseV1, GeneralDownloadExecutor> - Throws:
Exception
-