Skip to content

feat: set-route patch behavior - #91

Merged
DavidePrincipi merged 1 commit into
mainfrom
feat-7312-2
Mar 10, 2025
Merged

DavidePrincipi merged 1 commit into
mainfrom
feat-7312-2

Conversation

@DavidePrincipi

Copy link
Copy Markdown
Member

Introduce a patch behavior for set-route action. Modules can still invoke set-route for example during module updates, without interfering with attributes previously set by user preference, like ip_allowlist.

  • Relax the JSON schema to make all input attributes optional
  • Read current route attributes from get_route() and use its value as default for missing attributes
  • If the route is new, still enforce some checks and raise errors if minimal attributes are not given: url, host/path.

Refs NethServer/dev#7312

@DavidePrincipi
DavidePrincipi requested a review from Amygos March 7, 2025 16:34
@DavidePrincipi DavidePrincipi self-assigned this Mar 7, 2025
Introduce a patch behavior for set-route action. Modules can still
invoke set-route for example during module updates, without interfering
with attributes previously set by user preference, like ip_allowlist.

- Relax the JSON schema to make all input attributes optional
- Read current route attributes from get_route() and use its value as
  default for missing attributes
- If the route is new, still enforce some checks and raise errors if
  minimal attributes are not given: url, host/path.
@DavidePrincipi
DavidePrincipi merged commit 0e83149 into main Mar 10, 2025
@DavidePrincipi
DavidePrincipi deleted the feat-7312-2 branch March 10, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants