<commit_before>= Exercise 2 - JAX-RS

== Build a REST interface using JAX-RS

In this exercise you are going to create your first JAX-RS application. 
Continue with the application you created in Exercise 1, or use the provided starting point found in this Exercise.

=== Part 1
Create a simple Hello resource that says hello to the caller.

GET http://localhost:8080/exercise-2/api/hello/Duke
Hello Duke

=== Part 2
Create a REST API for a shopping list application. The following methods should be supported:

|===
| URI | Method | Input | Output | Response code | Description

| http://localhost:8080/exercise-3/api/items
| GET
| n/a
| JSON representation of item list
| 200

| http://localhost:8080/exercise-3/api/items
| POST
| JSON item
| n/a (URI in Location)
| 201

| http://localhost:8080/exercise-3/api/items/{id}
| GET
| n/a
| JSON item
| 200

| http://localhost:8080/exercise-3/api/items/{id}
| PUT
| JSON item
| n/a
| 200

| http://localhost:8080/exercise-3/api/items/{id}
| DELETE<commit_msg>exercise 2 text updated<commit_after>= Exercise 2 - JAX-RS

== Build a REST interface using JAX-RS

In this exercise you are going to create your first JAX-RS application. 
Continue with the application you created in Exercise 1, or use the provided starting point found in this Exercise.

=== Part 1
Create a simple Hello resource that says hello to the caller.

GET http://localhost:8080/exercise-2/api/hello/Duke
Hello Duke

=== Part 2
Create a REST API for a shopping list application. The following methods should be supported:

|===
| URI | Method | Input | Output | Response code

| http://localhost:8080/exercise-3/api/items
| GET
| n/a
| JSON representation of item list
| 200

| http://localhost:8080/exercise-3/api/items
| POST
| JSON item
| n/a (URI in Location)
| 201

| http://localhost:8080/exercise-3/api/items/{id}
| GET
| n/a
| JSON item
| 200

| http://localhost:8080/exercise-3/api/items/{id}
| PUT
| JSON item
| n/a
| 200

| http://localhost:8080/exercise-3/api/items/{id}
| DELETE
{'fraction_non_alphanumeric': 0.11703187250996015, 'fraction_numerical': 0.046314741035856574, 'mean_word_length': 3.7606635071090047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7622012', 'n_tokens_mistral': 722, 'n_tokens_neox': 623, 'n_words': 229}