Skip to content

CROSSLINK-295 Add batch action defaults to state model configuration#652

Open
JanisSaldabols wants to merge 2 commits into
mainfrom
CROSSLINK-295
Open

CROSSLINK-295 Add batch action defaults to state model configuration#652
JanisSaldabols wants to merge 2 commits into
mainfrom
CROSSLINK-295

Conversation

@JanisSaldabols

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 2, 2026 10:57

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

This PR introduces a consolidated built-in state model configuration file and exposes built-in “batch action default” templates via a new API endpoint, alongside the OpenAPI and module-permission wiring needed to surface that endpoint.

Changes:

  • Replace per-model embedded JSON loading with a single embedded state-models.json containing named state models.
  • Add batchActionDefaults to the state model configuration and expose them via GET /state_model/batch_actions.
  • Update OpenAPI and the module descriptor to include the new route and required permissions.

Reviewed changes

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

Show a summary per file
File Description
broker/patron_request/service/statemodels/state-models.json Adds consolidated state model config and introduces batch action default templates.
broker/patron_request/service/statemodels/returnables.json Removes the standalone returnables model JSON (now embedded via consolidated config).
broker/patron_request/service/statemodel.go Switches embedded loading to a single config file; adds accessors for batch action defaults.
broker/patron_request/api/api-handler.go Adds handler to return built-in batch action defaults.
broker/oapi/open-api.yaml Defines GET /state_model/batch_actions response schema.
broker/descriptors/ModuleDescriptor-template.json Adds permissions/routes for state model capabilities + batch action defaults endpoints.

Comment thread broker/patron_request/service/statemodel.go
Comment thread broker/patron_request/service/statemodels/state-models.json
Comment thread broker/patron_request/service/statemodels/state-models.json
Comment thread broker/patron_request/service/statemodels/state-models.json
Comment thread broker/patron_request/service/statemodels/state-models.json Outdated
Comment on lines +115 to +117
func (a *PatronRequestApiHandler) GetStateModelBatchActions(w http.ResponseWriter, r *http.Request, params proapi.GetStateModelBatchActionsParams) {
api.WriteJsonResponse(w, prservice.GetStateModelBatchActionDefaults())
}
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.

2 participants