Service that holds and manages user data.
- Quarkus
- Microservice
- Java
- Firebase
- Docker
- POST user { name, age, profession }
- GET user { name, age, profession }
- PATCH user/{id}/name
- PATCH user/{id}/age
- PATCH user/{id}/profession
- (Make ChatGPT give me an enum of possible professions)
- Create patch endpoint for professions
- Update UserRepository with updateUserProfession
- Create Profession enum (Generate enums from ChatGPT)
- Profession fromString(String profession)
- Create @JsonValue String toString()
- Create ProfessionInput with Profession as input value
- Update UserInput with
Profession profession
- update
UserRepository.createUser
with profession - Update UserService
updateUserProfession(String id, Profession profession)
- Generate endpoint in UserResource
- Update UserRepositoryTest
- Write test for assertUserExists
- Try and let Copilot write more tests
- testCreateUserWithNullName
- testCreateUserWithEmptyName
- Fix Illegal argument exception missing
- (OPTIONAL) Create UserServiceTest
- Use ChatGPT with code interpreter
- to refactoring suggestions for UserService: "Do you have any suggestions for refactoring in this file?"
- to write documentation for UserResource: "Please write documentation as markdown for the endpoints defined in this code"
- Use HuggingChat with web search
- Write ContextRequestFilter: "In Java, using the Quarkus framework, give me a ContainerRequestFilter that checks the input for bad words"
- Write BadRequestMapper: "In Java give me a BadRequestException ExceptionMapper that translates the exception into a response"
curl --location 'http://localhost:8080/user' \
--header 'Content-Type: application/json' \
--data '{
"name": "Ben",
"age": 23,
"profession": "TEACHER"
}'
curl --location 'http://localhost:8080/user/O6phXT1wP2lCCeH6icG6'
curl --location --request PATCH 'http://localhost:8080/user/O6phXT1wP2lCCeH6icG6/name' \
--header 'Content-Type: application/json' \
--data '{
"name": "David"
}'
curl --location --request PATCH 'http://localhost:8080/user/O6phXT1wP2lCCeH6icG6/profession' \
--header 'Content-Type: application/json' \
--data '{
"profession": "CHEF"
}'