Compare commits

..

4 Commits

Author SHA1 Message Date
13d752e69a
Support modifying a transaction category
through the PUT /transactions/{transactionId} method.

Restrict the PUT to changing only the category. The other existing
attributes should remain immutable.
Remove the body of the PUT response, it isn't required, and it was
returning a 204, which shouldn't have it.

This patch also extracts the CategoryName as a separate component on the
OpenAPI spec, so that it can be reused on the Transaction.

Issues #26 and #23
2024-06-23 23:03:58 +01:00
9ac249199b
Implements GET /categories
Adds type to OpenAPI. Feature done and tested E2E.
Adds common utilities package named "golang" to overcome language
deficiencies.

Issue #27
2024-06-23 22:01:50 +01:00
18c93b6c0f
Fix resources naming scheme
The accepted practice is to retain the collection name even for a single
resource operation, like getting a specific transaction.

Also moves the PUT /transactions to /transactions/{id} which makes it
clearer that it can only be applied to an already created transaction.
2024-06-22 22:34:14 +01:00
55bd87c864
Implements /transactions PUT method
Adds PUT method to OpenAPI spec.

Given that the transaction IDs are generated on server-side, for the PUT
method to remain idempotent, it can only update existing transactions.

It also adds a TransactionExists method on the DAL.

Issue: #20
2024-06-22 22:30:00 +01:00

View File

@ -1,28 +0,0 @@
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21', '1.22' ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...