server: Discovery endpoints status code mismatch

Open Beginner friendly
#625 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api

Research direction

Start in server/app/interfaces/discovery.py and inspect the handlers for POST /lookup/shells/{aasIdentifier} and DELETE /lookup/shells/{aasIdentifier}. Compare their responses with the Discovery Service Specification v3.1.1. Done means successful POST requests return 201 and DELETE requests return 404 when no links exist, while preserving the specified behavior otherwise.

Written by the indexing model from the issue text.

Description

bug server

The current implementation of the Discovery API (server/app/interfaces/discovery.py) responds in two scenarios with status codes differing from the specification v3.1.1.

  1. POST /lookup/shells/{aasIdentifier}: This endpoint should respond with 201 on success (currently 200)
  2. DELETE /lookup/shells/{aasIdentifier}: This endpoint should respond with 404 if no links exist for the specified AAS (currently always 204)

Although these are minor deviations, we should be consistent to the specification and therefore adapt the behavior.

Dominant language
Python
Stars
102
Forks
52
Avg merge
20d 17h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-basyx/basyx-python-sdk

All issues in eclipse-basyx/basyx-python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.