BrAPI icon indicating copy to clipboard operation
BrAPI copied to clipboard

POST /seasons lets the user set the seasonDbId?

Open feserm opened this issue 1 year ago • 1 comments

In endpoint POST /seasons the Body is structured like this:

[
  {
    "seasonDbId": "Spring_2018",
    "seasonName": "Spring",
    "year": 2018
  }
]

This allows the user to set the seasonDbId. Shouldn't this be:

[
  {
    "seasonName": "Spring",
    "year": 2018
  }
]

Then the server could decide what the DbId is and either you the concatenation of seasonName and year or another value

feserm avatar Oct 20 '23 08:10 feserm

I completely agree, that is how it should work... In this case, there was an issue where systems were ONLY using the single value seasonDbId to document their seasons. This meant they could not POST a new season without being able to submit the DbId. Some of the discussion happened in issue #434, some of it was in person during a hackathon

BrapiCoordinatorSelby avatar Oct 20 '23 17:10 BrapiCoordinatorSelby