From abbaf045c56e74040fbc98bf38cfab3747cc6607 Mon Sep 17 00:00:00 2001 From: Eric Schubert Date: Wed, 11 Feb 2026 14:11:20 +0100 Subject: [PATCH] [chore] fix api spec validation - validation script used unmaintained npm package - switched to actively maintained package from same maintainer - pipe full output to stdout - bump node major version in development backend Dockerfile - fix two api spec errors and two random warnings - boyscout, hell yeah --- docker/dev/backend/Dockerfile | 4 ++-- docs/api/apiv3/components/schemas/group_model.yml | 9 ++++++++- docs/api/apiv3/paths/grid.yml | 8 ++++++++ package.json | 2 +- script/api/validate_spec | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/docker/dev/backend/Dockerfile b/docker/dev/backend/Dockerfile index 70693f85c21..bc86675ea45 100644 --- a/docker/dev/backend/Dockerfile +++ b/docker/dev/backend/Dockerfile @@ -6,7 +6,7 @@ ARG DEV_GID=1001 ENV USER=dev ENV RAILS_ENV=development -ENV NODE_MAJOR=20 +ENV NODE_MAJOR=22 # `--no-log-init` is required as a workaround to avoid disk exhaustion. # @@ -30,7 +30,7 @@ RUN apt-get update -qq && \ rm -rf /var/lib/apt/lists/* # Setup node source and install nodejs. Needed for running certain scripts in backend container, -# as the `./scripts/api/validate_spec`. +# as the `./script/api/validate_spec`. RUN mkdir -p /etc/apt/keyrings RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list diff --git a/docs/api/apiv3/components/schemas/group_model.yml b/docs/api/apiv3/components/schemas/group_model.yml index e5818c4f088..38c7d9fab77 100644 --- a/docs/api/apiv3/components/schemas/group_model.yml +++ b/docs/api/apiv3/components/schemas/group_model.yml @@ -18,10 +18,17 @@ allOf: type: array description: Embedded list of members. items: - - $ref: './user_model.yml' + $ref: './user_model.yml' _links: type: object properties: + self: + allOf: + - $ref: './link.yml' + - description: |- + This group resource + + **Resource**: Group members: type: array items: diff --git a/docs/api/apiv3/paths/grid.yml b/docs/api/apiv3/paths/grid.yml index 03cfaec639c..5ab53a33473 100644 --- a/docs/api/apiv3/paths/grid.yml +++ b/docs/api/apiv3/paths/grid.yml @@ -47,6 +47,14 @@ patch: Updates the given grid by applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form endpoint should be used to be guided when wanting to update a grid. + parameters: + - name: id + in: path + description: Grid id + required: true + schema: + type: integer + example: '42' requestBody: content: application/json: diff --git a/package.json b/package.json index 0fa91d81f6e..efc58d163c4 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "npm": "^10.1.0" }, "devDependencies": { - "@redocly/openapi-cli": "^1.0.0-beta.80" + "@redocly/cli": "^2.17.0" }, "dependencies": { "@xeokit/xeokit-gltf-to-xkt": "^1.3.1" diff --git a/script/api/validate_spec b/script/api/validate_spec index 470604d092a..8bc88aef3ec 100755 --- a/script/api/validate_spec +++ b/script/api/validate_spec @@ -18,7 +18,7 @@ begin file.puts full_spec end - `npx @redocly/openapi-cli lint #{openapi_yaml_spec_path}` + system("npx @redocly/cli lint #{openapi_yaml_spec_path}") status = $?.exitstatus ensure