indra4837/pokemon

US4: CRUD operations

Closed this issue · 1 comments

Description

As an API user, I want to create, read, update and delete trainer and pokemon data.

API endpoints:

Trainer

  • /trainer/delete?trainerId={trainerId}
  • /trainer/create?id={id}&firstName={firstName}&lastName={lastName}&dateOfBirth={dateOfBirth}
  • /trainer/update?id={id}&firstName={firstName}&lastName={lastName}&dateOfBirth={dateOfBirth}

Pokemon

  • /pokemon/delete?pokemonId={pokemonId}
  • /pokemon/create?id={id}&nickname={nickname}&species={species}&level={level}&owner={owner}&dateOfOwnership={dateOfOwnership}
  • /pokemon/update?id={id}&nickname={nickname}&species={species}&level={level}&owner={owner}&dateOfOwnership={dateOfOwnership}

Acceptance Criteria:

  • on delete, cascade to relations as well
  • validate data and handle exceptions

Closing issue as PR is merged