-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add export template api #35
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite good and clean! Just a few remarks regarding naming and comments for easier understanding of the code.
Nice test coverage also!
- update README with a short section on the feature + setup instructions
- add open-api specs file for our endpoints
- naming of the endpoint + module (export reminds me more of csv exports ... but I understand the intention behind this also ...)
...m-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/auth/core/AuthProvider.kt
Outdated
Show resolved
Hide resolved
...d-service/src/main/kotlin/com/aamdigital/aambackendservice/auth/core/KeycloakAuthProvider.kt
Show resolved
Hide resolved
...c/main/kotlin/com/aamdigital/aambackendservice/export/controller/TemplateExportController.kt
Show resolved
Hide resolved
...c/main/kotlin/com/aamdigital/aambackendservice/export/controller/TemplateExportController.kt
Outdated
Show resolved
Hide resolved
...ckend-service/src/main/kotlin/com/aamdigital/aambackendservice/export/core/ExportTemplate.kt
Outdated
Show resolved
Hide resolved
.../main/kotlin/com/aamdigital/aambackendservice/export/usecase/DefaultRenderTemplateUseCase.kt
Outdated
Show resolved
Hide resolved
...t/kotlin/com/aamdigital/aambackendservice/export/usecase/DefaultRenderTemplateUseCaseTest.kt
Outdated
Show resolved
Hide resolved
...t/kotlin/com/aamdigital/aambackendservice/export/usecase/DefaultRenderTemplateUseCaseTest.kt
Show resolved
Hide resolved
application/aam-backend-service/src/test/resources/cucumber/features/export/export.feature
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Thanks for adding all this documentation. Really helpful.
* The ExportTemplate entity is then created in the frontend. | ||
* Default implementation of the [CreateTemplateUseCase] interface. | ||
* | ||
* This use case is responsible for creating a template by making a POST request to a specified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* This use case is responsible for creating a template by making a POST request to a specified | |
* This use case is responsible for registering a template file by making a POST request to a specified |
paths: | ||
/template: | ||
post: | ||
summary: Post a new template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
summary: Post a new template | |
summary: Post a new template | |
description: Registers a template file. Creating the TemplateExport entity is handled by the client not by this endpoint through the server. |
required: true | ||
schema: | ||
type: string | ||
description: The ID of the template to be rendered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: The ID of the template to be rendered | |
description: The ID of the TemplateExport entity to be rendered |
properties: | ||
convertTo: | ||
type: string | ||
description: The format to convert the template to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: The format to convert the template to | |
description: The format to convert the template to, e.g. "pdf" in order to receive a PDF file in the reponse |
summary: Fetch an existing template | ||
parameters: | ||
- name: templateId | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
description: The ID of the template to be rendered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
summary: Fetch an existing template | |
parameters: | |
- name: templateId | |
in: path | |
required: true | |
schema: | |
type: string | |
description: The ID of the template to be rendered | |
summary: Fetch an existing template file | |
description: Get the uploaded template file with its placeholders (not a generated document filled with data based on the template) | |
parameters: | |
- name: templateId | |
in: path | |
required: true | |
schema: | |
type: string | |
description: The ID of the TemplateExport entity |
|
||
## Overview | ||
|
||
The export module is responsible for handling various template-based export operations. This module primarily focuses on generating PDFs for entities within the AAM system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The export module is responsible for handling various template-based export operations. This module primarily focuses on generating PDFs for entities within the AAM system. | |
The export module is responsible for handling various template-based export operations. | |
This module primarily focuses on generating PDFs for entities within the Aam Digital system. |
(trying to use "Aam" rather than "AAM" consistently. Otherwise people often mistake this for an acronym)
|
||
### Dependencies | ||
|
||
This service is using an external template engine for handle placeholder replacement in files and render PDF files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This service is using an external template engine for handle placeholder replacement in files and render PDF files. | |
This service is using an external template engine to handle placeholder replacement in files and render PDF (or other supported) files. |
|
||
info: | ||
description: |- | ||
Carbone Cloud/On-premise Open API reference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Carbone Cloud/On-premise Open API reference. | |
Carbone Cloud/On-premise Open API reference. | |
This API is used by the aam-services backend internally, exposing its functionality through our own, auth protected endpoints. |
No description provided.