Skip to content

Commit

Permalink
feat!: support of test runs
Browse files Browse the repository at this point in the history
Refs: #192
  • Loading branch information
grigoriev committed Sep 10, 2024
1 parent 63c4e7f commit 12f47e1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ All good so far.

## Upgrade

### Upgrade from version 6.x.x to 7.0.0

In version 7.0.0 `/export-filename` REST API endpoint changed. As a result, if the endpoint has been used, it's required to adjust the calls accordingly.

### Upgrade from version 5.x.x to 6.0.0

In version 6.0.0 WeasyPrint CLI support was removed. As a result, if WeasyPrint CLI has been using to generate PDFs, it's required to switch to [WeasyPrint Service](#weasyprint-configuration).
Expand Down
4 changes: 3 additions & 1 deletion docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,9 @@
"$ref": "#/components/schemas/ExportParams"
}
}
}
},
"description": "Export parameters similar as for generation of PDF",
"required": true
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ch.sbb.polarion.extension.pdf.exporter.model.WebhooksStatus;
import ch.sbb.polarion.extension.pdf.exporter.properties.PdfExporterExtensionConfiguration;
import ch.sbb.polarion.extension.pdf.exporter.rest.model.conversion.DocumentType;
import ch.sbb.polarion.extension.pdf.exporter.rest.model.conversion.ExportParams;
import ch.sbb.polarion.extension.pdf.exporter.service.PdfExporterPolarionService;
import ch.sbb.polarion.extension.pdf.exporter.util.DocumentFileNameHelper;
Expand Down Expand Up @@ -99,6 +98,12 @@ public String getProjectName(@PathParam("projectId") String projectId) {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.TEXT_PLAIN)
@Operation(summary = "Gets a filename, prepared with velocity and placeholders",
requestBody = @RequestBody(description = "Export parameters similar as for generation of PDF",
required = true,
content = @Content(schema = @Schema(implementation = ExportParams.class),
mediaType = MediaType.APPLICATION_JSON
)
),
responses = {
@ApiResponse(responseCode = "200", description = "Successfully generated filename")
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/webapp/pdf-exporter/js/pdf-exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const PdfExporter = {

loadFormData: function (params) {
this.exportContext = new ExportContext();
this.exportContext.documentType = params && params.context ? params.context : "document";
this.exportContext.documentType = params?.context ? params.context : "document";

this.actionInProgress({inProgress: true, message: "Loading form data"});

Expand Down

0 comments on commit 12f47e1

Please sign in to comment.