# Bug OP-9804 - OpenAPI Specs wrong for creating work package relations

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-9804

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 14.5.0 |
| Observed in versions | 12.0.0 |
| Sprint | 14.5.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 12.0.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Eric Schubert |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### **Environment**:

Your OpenProject Version: 12.0

Operating System / Browser / OpenProject language: Linux/Chromium

### **Logs**

\-

### **Steps to reproduce:**

1.  Look at the specs of the create\_relation call in the workpackages endpoint: https://www.openproject.org/docs/api/endpoints/work-packages/#create-relation
    
2.  look at the call in the OpenAPI spec file: &quot;/api/v3/work\_packages/{id}/relations&quot; having really only the id as parameter
    

### **Actual Behavior**

The text says: &quot;When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. ...&quot; The API on the other hand does only allow to specify one id as argument. There is no body that can be sent.

### **Expected Behavior**

API should look like the addComment call in the workpackages endpoint. So I would guess it needs to look more like the API for /api/v3/work\_packages/{id}/activities . This has a requestBody section.

### Hint

*   check for cross functionality with all endpoints under `/api/v3/relations`
    

### For QA

*   check if relations endpoints are documented and rendered correctly e.g. at `/api/docs`
    
    *   relevant endpoints
        
        *   `/api/v3/relations` (all)
            
        *   `/api/v3/work_packages/:id/relations` (POST)
