-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #570 from Frooodle/test
Pipeline release
- Loading branch information
Showing
59 changed files
with
1,711 additions
and
812 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "Prepare-pdfs-for-email", | ||
"pipeline": [ | ||
{ | ||
"operation": "/api/v1/misc/repair", | ||
"parameters": {} | ||
}, | ||
{ | ||
"operation": "/api/v1/security/sanitize-pdf", | ||
"parameters": { | ||
"removeJavaScript": true, | ||
"removeEmbeddedFiles": false, | ||
"removeMetadata": false, | ||
"removeLinks": false, | ||
"removeFonts": false | ||
} | ||
}, | ||
{ | ||
"operation": "/api/v1/misc/compress-pdf", | ||
"parameters": { | ||
"optimizeLevel": 2, | ||
"expectedOutputSize": "" | ||
} | ||
}, | ||
{ | ||
"operation": "/api/v1/general/split-by-size-or-count", | ||
"parameters": { | ||
"splitType": 0, | ||
"splitValue": "15MB" | ||
} | ||
} | ||
], | ||
"_examples": { | ||
"outputDir": "{outputFolder}/{folderName}", | ||
"outputFileName": "{filename}-{pipelineName}-{date}-{time}" | ||
}, | ||
"outputDir": "httpWebRequest", | ||
"outputFileName": "{filename}" | ||
} |
33 changes: 33 additions & 0 deletions
33
pipeline/defaultWebUIConfigs/split-rotate-auto-rename.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "split-rotate-auto-rename", | ||
"pipeline": [ | ||
{ | ||
"operation": "/api/v1/general/split-pdf-by-sections", | ||
"parameters": { | ||
"horizontalDivisions": 2, | ||
"verticalDivisions": 2, | ||
"fileInput": "automated" | ||
} | ||
}, | ||
{ | ||
"operation": "/api/v1/general/rotate-pdf", | ||
"parameters": { | ||
"angle": 90, | ||
"fileInput": "automated" | ||
} | ||
}, | ||
{ | ||
"operation": "/api/v1/misc/auto-rename", | ||
"parameters": { | ||
"useFirstTextAsFallback": false, | ||
"fileInput": "automated" | ||
} | ||
} | ||
], | ||
"_examples": { | ||
"outputDir": "{outputFolder}/{folderName}", | ||
"outputFileName": "{filename}-{pipelineName}-{date}-{time}" | ||
}, | ||
"outputDir": "{outputFolder}", | ||
"outputFileName": "{filename}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 26 additions & 11 deletions
37
src/main/java/stirling/software/SPDF/config/OpenApiConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,42 @@ | ||
package stirling.software.SPDF.config; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import io.swagger.v3.oas.models.Components; | ||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import io.swagger.v3.oas.models.security.SecurityRequirement; | ||
import io.swagger.v3.oas.models.security.SecurityScheme; | ||
import stirling.software.SPDF.model.ApplicationProperties; | ||
|
||
@Configuration | ||
public class OpenApiConfig { | ||
|
||
@Autowired | ||
ApplicationProperties applicationProperties; | ||
|
||
@Bean | ||
public OpenAPI customOpenAPI() { | ||
String version = getClass().getPackage().getImplementationVersion(); | ||
if (version == null) { | ||
|
||
version = "1.0.0"; // default version if all else fails | ||
|
||
} | ||
|
||
return new OpenAPI().components(new Components()).info( | ||
new Info().title("Stirling PDF API").version(version).description("API documentation for all Server-Side processing.\nPlease note some functionality might be UI only and missing from here.")); | ||
} | ||
String version = getClass().getPackage().getImplementationVersion(); | ||
if (version == null) { | ||
version = "1.0.0"; // default version if all else fails | ||
} | ||
|
||
SecurityScheme apiKeyScheme = new SecurityScheme().type(SecurityScheme.Type.APIKEY).in(SecurityScheme.In.HEADER) | ||
.name("X-API-KEY"); | ||
if (!applicationProperties.getSecurity().getEnableLogin()) { | ||
return new OpenAPI().components(new Components()) | ||
.info(new Info().title("Stirling PDF API").version(version).description( | ||
"API documentation for all Server-Side processing.\nPlease note some functionality might be UI only and missing from here.")); | ||
} else { | ||
return new OpenAPI().components(new Components().addSecuritySchemes("apiKey", apiKeyScheme)) | ||
.info(new Info().title("Stirling PDF API").version(version).description( | ||
"API documentation for all Server-Side processing.\nPlease note some functionality might be UI only and missing from here.")) | ||
.addSecurityItem(new SecurityRequirement().addList("apiKey")); | ||
} | ||
|
||
} | ||
|
||
} | ||
} |
Oops, something went wrong.