Skip to content

refactor: occupation and occupation group cleanups#486

Merged
irumvanselme merged 1 commit intomainfrom
refactor/occupation-and-occupation-group-cleanups
Mar 30, 2026
Merged

refactor: occupation and occupation group cleanups#486
irumvanselme merged 1 commit intomainfrom
refactor/occupation-and-occupation-group-cleanups

Conversation

@irumvanselme
Copy link
Copy Markdown
Collaborator

No description provided.

@irumvanselme irumvanselme force-pushed the refactor/occupation-and-occupation-group-cleanups branch from df024b2 to 5453704 Compare March 30, 2026 09:56
Comment on lines 949 to 955
*
* /models/{modelId}/occupations/{id}/skills:
* get:
* operationId: GETOccupationSkills
* operationId: GETkills
* tags:
* - occupations
* summary: Get the skills of an occupation.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: A typo in the JSDoc operationId for getSkills (GETkills instead of GETOccupationSkills) causes a broken schema reference in the generated OpenAPI documentation.
Severity: MEDIUM

Suggested Fix

Correct the typo in the JSDoc comment in backend/src/esco/occupations/index.ts. Change the operationId from GETkills back to GETOccupationSkills and update the corresponding error schema reference from GETkills404ErrorSchema to GETOccupationSkills404ErrorSchema to match the definition in the OpenAPI generator.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: backend/src/esco/occupations/index.ts#L949-L955

Potential issue: In the `getSkills` method's JSDoc comments, the `operationId` was
changed to `GETkills` and the corresponding schema reference was updated to
`GETkills404ErrorSchema`. However, the OpenAPI schema registration in
`backend/openapi/generateOpenApiDoc.ts` still defines the schema as
`GETOccupationSkills404ErrorSchema`. This mismatch creates a broken `$ref` in the
generated OpenAPI specification, as it points to a schema that does not exist. While
this does not cause a runtime server error, it breaks OpenAPI specification validation
and can cause failures in API documentation and client generation tools that depend on a
valid schema.

Did we get this right? 👍 / 👎 to inform future reviews.

@irumvanselme irumvanselme force-pushed the refactor/occupation-and-occupation-group-cleanups branch from 5453704 to 78b9b1b Compare March 30, 2026 10:16
@irumvanselme irumvanselme merged commit b89a28f into main Mar 30, 2026
13 checks passed
@irumvanselme irumvanselme deleted the refactor/occupation-and-occupation-group-cleanups branch March 30, 2026 10:26
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.

1 participant