Skip to content

CROSSLINK-305 Add default template endpoint - #696

Merged
JanisSaldabols merged 2 commits into
mainfrom
CROSSLINK-305
Jul 30, 2026
Merged

CROSSLINK-305 Add default template endpoint#696
JanisSaldabols merged 2 commits into
mainfrom
CROSSLINK-305

Conversation

@JanisSaldabols

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 30, 2026 09:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “template defaults” concept alongside existing state-model/batch-action defaults, exposing it via the patron-requests API so clients can retrieve built-in template presets (e.g., for scheduled pullslip summary emails).

Changes:

  • Added templateDefaults (including an initial HTML email template) to misc/state-models.yaml.
  • Extended the embedded state model config parsing and added GetStateModelTemplateDefaults() to return template defaults defensively.
  • Introduced a new GET endpoint /state_model/templates in OpenAPI and implemented the corresponding API handler.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
misc/state-models.yaml Adds a built-in default template definition (scheduled pullslips email).
broker/patron_request/service/statemodel.go Adds TemplateDefaults to embedded config and exposes GetStateModelTemplateDefaults().
broker/patron_request/api/api-handler.go Implements GetStateModelTemplates handler to serve the defaults.
broker/oapi/open-api.yaml Defines the new /state_model/templates endpoint returning CreateTemplate[].

Comment thread broker/patron_request/service/statemodel.go
Comment thread broker/patron_request/api/api-handler.go
@JanisSaldabols
JanisSaldabols merged commit db1920a into main Jul 30, 2026
6 checks passed
@JanisSaldabols
JanisSaldabols deleted the CROSSLINK-305 branch July 30, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants