diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 8f0c3b646..bd9143642 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 diff --git a/specification/build/haproxy_spec.yaml b/specification/build/haproxy_spec.yaml index eaf403162..d30f58f32 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 b2c842662..f1f4f1d39 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