From a00b547bc4322aa92e3dfdf6ece0452167f50dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Kj=C3=A6r=20Aabo?= Date: Fri, 6 Nov 2026 21:26:03 +0100 Subject: [PATCH 1/2] MINOR: specification: add runtime map replacement operation Add the missing OpenAPI 2 PUT operation for atomically replacing all entries in a runtime map. Regenerate the bundled specification used by the embedded specification endpoint and generated clients. --- specification/build/haproxy_spec.yaml | 29 +++++++++++++++++++ specification/paths/runtime/maps_entries.yaml | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/specification/build/haproxy_spec.yaml b/specification/build/haproxy_spec.yaml index eaf40316..d30f58f3 100644 --- a/specification/build/haproxy_spec.yaml +++ b/specification/build/haproxy_spec.yaml @@ -27143,6 +27143,35 @@ paths: summary: Adds an entry into the map file tags: - Maps + put: + description: Atomically replaces all entries in a runtime map. + operationId: replaceRuntimeMapEntries + parameters: + - $ref: '#/parameters/parent_name' + - default: false + description: If true, immediately syncs changes to disk + in: query + name: force_sync + type: boolean + - in: body + name: data + required: true + schema: + $ref: '#/definitions/map_entries' + responses: + "200": + description: Runtime map entries replaced + schema: + $ref: '#/definitions/map_entries' + "400": + $ref: '#/responses/BadRequest' + "404": + $ref: '#/responses/NotFound' + default: + $ref: '#/responses/DefaultError' + summary: Replace all entries in a runtime map + tags: + - Maps /services/haproxy/runtime/maps/{parent_name}/entries/{id}: delete: description: Delete all the map entries from the map by its id. diff --git a/specification/paths/runtime/maps_entries.yaml b/specification/paths/runtime/maps_entries.yaml index b2c84266..f1f4f1d3 100644 --- a/specification/paths/runtime/maps_entries.yaml +++ b/specification/paths/runtime/maps_entries.yaml @@ -46,6 +46,35 @@ maps_entries: $ref: '#/responses/BadRequest' 'default': $ref: '#/responses/DefaultError' + put: + summary: Replace all entries in a runtime map + description: Atomically replaces all entries in a runtime map. + operationId: replaceRuntimeMapEntries + tags: + - Maps + parameters: + - $ref: "#/parameters/parent_name" + - name: force_sync + in: query + description: If true, immediately syncs changes to disk + type: boolean + default: false + - name: data + in: body + required: true + schema: + $ref: '#/definitions/map_entries' + responses: + '200': + description: Runtime map entries replaced + schema: + $ref: '#/definitions/map_entries' + '400': + $ref: '#/responses/BadRequest' + '404': + $ref: '#/responses/NotFound' + 'default': + $ref: '#/responses/DefaultError' maps_entries_one: get: # get map summary: Return one map runtime setting From d57b8c24b6cfe19a5d92f0655e400cfa579eb6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Kj=C3=A6r=20Aabo?= Date: Fri, 6 Nov 2026 21:32:37 +0100 Subject: [PATCH 2/2] BUG/MINOR: ci: preserve model helper files during regeneration Only remove generated top-level Go files before regenerating models. Keep models/funcs because go-method-gen requires its overrides and helpers. --- .github/workflows/actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 8f0c3b64..bd914364 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -40,7 +40,7 @@ jobs: go-version-file: "go.mod" check-latest: true - name: clearing models - run: rm -rf models/* + run: find models -maxdepth 1 -type f -name "*.go" -exec rm -f {} \; - name: generating models run: make models - name: changes