Document email template and system config variable endpoints - #381
Open
MoamenElbarqy wants to merge 1 commit into
Open
Document email template and system config variable endpoints#381MoamenElbarqy wants to merge 1 commit into
MoamenElbarqy wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The documentation examples contain inconsistencies/inaccuracies (notably paginated HAL fields and an impossible SHA-256 ETag example) that should be corrected before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds/updates REST contract documentation for new admin-only email template management and a dedicated system config variable endpoint, aligning the contract with the backend decision to decouple config variables from template payloads.
Changes:
- Documented
/api/system/emailtemplatesincluding ETag-based optimistic concurrency and validation/status codes. - Added
systemconfigvariables.mdto document list and single-item retrieval of allowed template config variables. - Updated
endpoints.mdto link the new endpoint docs and added a coordinatingPULL_REQUEST.md.
File summaries
| File | Description |
|---|---|
| systemconfigvariables.md | New contract page for listing and retrieving allowed system config variables for templates |
| emailtemplates.md | New/updated contract page for admin email template retrieval and update with ETag concurrency |
| endpoints.md | Adds links to the newly documented endpoints |
| PULL_REQUEST.md | Captures cross-repo references and a summary of the coordinated feature |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ## References | ||
|
|
||
| * Related to [DSpace/dspace-angular#5828](https://github.com/DSpace/dspace-angular/issues/5828) | ||
| * Backend implementation: [DSpace/DSpace](https://github.com/DSpace/DSpace) (Branch: `feature/admin-email-templates`) |
| } | ||
| ], | ||
| "lastModified": "2026-09-05T12:00:00Z", | ||
| "etag": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", |
|
|
||
| This endpoint exposes the general repository configuration variables that administrators may reference inside email templates (e.g. `${config.get('dspace.name')}`). | ||
|
|
||
| It returns the subset of configuration properties allowed in templates, as defined by `message.templates.allowed-config` (resolved via `Utils.getAllowedTemplateConfig()`, matching `Email.java` and `LDN.java`). |
Comment on lines
+22
to
+39
| { | ||
| "_embedded": { | ||
| "systemconfigvariables": [ | ||
| { | ||
| "key": "dspace.name", | ||
| "value": "DSpace at My University", | ||
| "placeholder": "${config.get('dspace.name')}", | ||
| "type": "systemconfigvariable" | ||
| }, | ||
| { | ||
| "key": "dspace.ui.url", | ||
| "value": "http://localhost:4000", | ||
| "placeholder": "${config.get('dspace.ui.url')}", | ||
| "type": "systemconfigvariable" | ||
| } | ||
| ] | ||
| } | ||
| } |
Part 2 of 3 for DSpace/dspace-angular#5828: REST contract for /api/system/emailtemplates (ETag concurrency, 304/412/428, 400 validation) and /api/system/systemconfigvariables (allowed config discovery, decoupled from template payloads).
MoamenElbarqy
force-pushed
the
feature/email-templates-docs
branch
from
September 9, 2026 06:48
6356363 to
caf3667
Compare
11 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
DSpace/RestContractDSpace/dspace-angular(Branch:feature/admin-email-templates)Description
Documents the two new admin-only endpoints for email template management:
/api/system/emailtemplates(list, retrieve withETag/If-None-Match→ 304 supporting multi-value, weakW/, and wildcard*, update withIf-Match→ 428/412 supporting multi-value, weakW/, and wildcard*, preserving template whitespace, 400 on VTL/XSS/length violations)./api/system/systemconfigvariables(paginated list + retrieve single allowed config variable:key,value,placeholder).Key contract decision: Configuration variables are not embedded in template payloads — clients fetch them once from the dedicated endpoint instead of receiving the identical list duplicated in every template.
List of Changes in this PR
emailtemplates.md: Documents template endpoints, field constraints (namepattern,content10–50000,subjectmax 500, variabledescriptionmax 500,placeholdermax 30), ETag concurrency with multi-value/weak validator/wildcard handling, accurate deterministic content hash example, and whitespace preservation behavior on update.systemconfigvariables.md: Paginated list with HAL_linksandpagemetadata + retrieve-single contract with example payloads, field constraints (keypattern,valuemax 2000,placeholdermax 255), clean contract phrasing, and status codes (200, 401, 403, 404).endpoints.md: Linked both pages.Checklist
mainbranch of code.systemconfigvariabletype name, status codes, validation limits).