Skip to content

GET /submodel-descriptors for getAllSubmodelDescriptors 404 is never a valid status code #597

@aaronzi

Description

@aaronzi

What happens?

In the Submodel Registry, GET /submodel-descriptors does not return 404 Not Found. If no submodel descriptors are available, the endpoint returns 200 OK with an empty result instead.

Minimal example:

BASE_URL="http://localhost:8083"

curl -i \
  -X GET "$BASE_URL/submodel-descriptors"

Observed response:

  • HTTP 200 OK
  • Empty result array

The OpenAPI spec currently documents 404 for this operation.

Why is this wrong?

GET /submodel-descriptors represents a collection resource. An empty collection should be returned as 200 OK with an empty result, not as 404 Not Found.

This is also consistent with the AAS Registry, where GET /shell-descriptors returns an empty result when no descriptors exist.

Keeping 404 in the response set creates ambiguity for implementers, SDKs, and conformance tests.

How should it be fixed?

Remove 404 from the documented responses for GET /submodel-descriptors in the Submodel Registry OpenAPI spec.

Proposed response block:

paths:
  /submodel-descriptors:
    get:
      operationId: GetAllSubmodelDescriptors
      responses:
        '200':
          description: Requested submodel descriptors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSubmodelDescriptorsResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        default:
          $ref: '#/components/responses/Error'
  • I have signed the required Developer Certificate of Origin (DCO) already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions