Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Use references in shifts list, added shift types endpoints #1356

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MyIgel
Copy link
Member

@MyIgel MyIgel commented Feb 18, 2024

  • Use references in shifts list instead of always returning full data sets (breaking change in beta API)
    This change is definitely needed to improve the file size for example for room shift endpoints as they are currently too big with tons of redundant datasets
  • Group entries by angeltypes to show additional states like freeloaded (breaking response structure change)
  • Renamed users tshirt to tshirt_size (breaking response structure)
  • Added shift types endpoints (list and shifts by shift type) to retrieve them
  • Added description to location
  • Fixed model nullable, casts and default values
  • Improved api tests error messages when response does not match the spec

@MyIgel MyIgel added Type: Feature An idea for a new feature Type: Refactor Make the code better. labels Feb 18, 2024
@MyIgel MyIgel requested a review from xuwhite April 26, 2024 22:34
Copy link
Collaborator

@xuwhite xuwhite left a comment

Choose a reason for hiding this comment

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

  • in references names in addition to ids would be helpful
  • change title of shifts to name
  • please change type to angeltype in shiftentries
{
  "entries": [
    {
      "users": [],
      "type": { "id": 1 },
      "needs": 2
    }
  ]
}

resources/api/openapi.yml Outdated Show resolved Hide resolved
resources/api/openapi.yml Show resolved Hide resolved
resources/api/openapi.yml Show resolved Hide resolved
resources/api/openapi.yml Outdated Show resolved Hide resolved
@MyIgel MyIgel force-pushed the api branch 2 times, most recently from 239fccd to 3befc73 Compare May 5, 2024 21:35
@MyIgel MyIgel requested a review from xuwhite May 5, 2024 21:36
@xuwhite xuwhite self-requested a review May 7, 2024 10:08
@xuwhite
Copy link
Collaborator

xuwhite commented May 8, 2024

I don't get all shifts with the angeltype from /angeltypes/{id}/shifts
IMAGE 2024-05-08 14:13:37
IMAGE 2024-05-08 14:13:42

4 is not equal 72

Edit: Moved to issue #1392

@xuwhite
Copy link
Collaborator

xuwhite commented May 8, 2024

Screenshot 2024-05-08 at 18 54 18 Screenshot 2024-05-08 at 18 54 45

please add freeloaded to shifts

@xuwhite
Copy link
Collaborator

xuwhite commented May 8, 2024

Please change tshirt to goodie in /users/{id}
Screenshot 2024-05-08 at 19 15 37

@xuwhite
Copy link
Collaborator

xuwhite commented May 8, 2024

please add at least Description to locations (like angeltypes)

Copy link
Collaborator

@xuwhite xuwhite left a comment

Choose a reason for hiding this comment

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

please fix the comments above

@MyIgel
Copy link
Member Author

MyIgel commented May 19, 2024

please add freeloaded to shifts

@xuwhite The current model does not have a good place for that without restructuring

Please change tshirt to goodie in /users/{id}

Thats the tshirt size as per documentation, i could change the key to tshirt_size to make it clearer 🤷

please add at least Description to locations (like angeltypes)

done

@MyIgel MyIgel requested a review from xuwhite May 19, 2024 17:16
@xuwhite
Copy link
Collaborator

xuwhite commented May 19, 2024

Please change tshirt to goodie in /users/{id}

Thats the tshirt size as per documentation, i could change the key to tshirt_size to make it clearer 🤷

please do so

@xuwhite
Copy link
Collaborator

xuwhite commented May 19, 2024

please add freeloaded to shifts

@xuwhite The current model does not have a good place for that without restructuring

than I would prefer to not show the user in a freeloaded shift

@MyIgel
Copy link
Member Author

MyIgel commented May 26, 2024

please add freeloaded to shifts

Its implemented and needed a bigger change (grouping entries by angeltype and then user to show that state) but here it is

…ming

* Use reference to objects instead of complete data set
* References contain an id and optionally a name
* Renamed title to name in news and shift resources
* Renamed type to angeltype in shift entries
* Added host placeholder to openapi spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature An idea for a new feature Type: Refactor Make the code better.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants