Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 1 addition & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository implements the [Three Letter Abbreviations (TLA) Sample Applicat
It can easily be deployed on AWS.
The following graphic gives an architecture overview of the app:

![TLA Sample App - Implemented Serverless](./docs/images/Architecture_Overview.png)
![TLA Sample App - Implemented Serverless](./docs/images/Architecture_Overview.jpg)

The app uses the following AWS services:
* **Amazon API Gateway** now serves the RESTful HTTP API to access the TLA's.
Expand Down Expand Up @@ -144,9 +144,7 @@ _Note_ that you will need to replace `{baseUrl}` with the URLs you get from `sls
| /tlas | GET | Get all TLA groups including their TLAs (accepted TLAs only). |
| /tlas?status=PROPOSED | GET | Get TLAs in PROPOSED state. |
| /tlas | POST | Create a new TLA group (see sample payload below). Containing TLAs will be in PROPOSED state. |
| /tlas/{groupName} | GET | Get all TLAs of a specific group. |
| /tlas/{groupName} | POST | Create a new TLA within an existing group (see sample payload below). The created TLA will be in PROPOSED state. |
| /tlas/all/{name} | GET | Search for a TLA over all groups. This query can return multiple TLAs as a single TLA is only unique within one group. |
| /tlas/{groupName}/{name}/accept | PUT | Accept a proposed TLA ([state transition operation](https://microservice-api-patterns.org/patterns/responsibility/operationResponsibilities/StateTransitionOperation): PROPOSED -> ACCEPTED). |

#### Get All TLA Groups
Expand Down Expand Up @@ -226,70 +224,6 @@ The `/tlas` (GET) endpoint returns all TLAs of all TLA groups that are in the `A
Note that the endpoint returns all TLAs in state `ACCEPTED` by default.
Use the query parameter `status` with the value `PROPOSED` to list TLAs in the `PROPOSED` state (see example below under "Query Proposed TLAs").

#### Get TLAs of a Specific Group
The endpoint `/tlas/{groupName}` (GET) returns all TLAs of a specific group.

**Sample CURL**: `curl -X GET {baseUrl}/tlas/DDD`

**Sample output:**

```json
{
"name": "DDD",
"description": "Domain-Driven Design",
"tlas": [
{
"name": "ACL",
"meaning": "Anticorruption Layer",
"alternativeMeanings": []
},
{
"name": "CF",
"meaning": "Conformist",
"alternativeMeanings": []
},
{
"name": "OHS",
"meaning": "Open Host Service",
"alternativeMeanings": []
},
{
"name": "PL",
"meaning": "Published Language",
"alternativeMeanings": []
},
{
"name": "SK",
"meaning": "Shared Kernel",
"alternativeMeanings": []
}
]
}
```

#### Search TLA in All Groups
With the endpoint `/tlas/all/{name}` (GET) you can search for a TLA through all groups. Note that this might return multiple results, as TLAs are only unique within one group.

**Sample CURL**: `curl -X GET {baseUrl}/tlas/all/ACL`

**Sample output:**

```json
[
{
"name": "DDD",
"description": "Domain-Driven Design",
"tlas": [
{
"name": "ACL",
"meaning": "Anticorruption Layer",
"alternativeMeanings": []
}
]
}
]
```

#### Create new TLA Group
Via `/tlas` (POST) you can create a new TLA group.

Expand Down
Binary file modified docs/images/Architecture_Detail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Architecture_Overview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/Architecture_Overview.png
Binary file not shown.
12 changes: 0 additions & 12 deletions manager/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,6 @@ functions:
- httpApi:
path: /tlas
method: get
readAllTlas:
handler: TLAManager.Infrastructure::TLAManager.Infrastructure.WebApi.Functions.GetAllTlasFunction::GetAllTlasAsync
events:
- httpApi:
path: /tlas/all/{name}
method: get
readTlaGroupByName:
handler: TLAManager.Infrastructure::TLAManager.Infrastructure.WebApi.Functions.GetTlaGroupByNameFunction::GetTlaGroupByNameAsync
events:
- httpApi:
path: /tlas/{groupName}
method: get
addNewTlaGroup:
handler: TLAManager.Infrastructure::TLAManager.Infrastructure.WebApi.Functions.AddTlaGroupFunction::AddTlaGroupAsync
events:
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ public interface ITlaGroupsApplicationService
{
Task<List<TLAGroup>> FindAllTlaGroupsAsync();
Task<List<TLAGroup>> FindAllTlaGroupsAsync(TLAStatus status);
Task<List<TLAGroup>> FindAllTlasByNameAsync(string name);
Task<TLAGroup> FindGroupByNameAsync(string name);
Task<TLAGroup> AddTlaGroupAsync(TLAGroup tlaGroup);
Task<TLAGroup> AddTlaAsync(string groupName, ThreeLetterAbbreviation tla);
Task<TLAGroup> AcceptTlaAsync(string groupName, string tlaName);
Expand Down
20 changes: 0 additions & 20 deletions manager/src/TLAManager.Services/TlaGroupsApplicationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,6 @@ public async Task<List<TLAGroup>> FindAllTlaGroupsAsync(TLAStatus status)
.ToList();
}

public async Task<List<TLAGroup>> FindAllTlasByNameAsync(string name)
{
var groups = await FindAllTlaGroupsAsync(TLAStatus.Accepted);
return groups.Where(group => group.Tlas.Any(tla => tla.Name.Name.Equals(name)))
.Select(group => new TLAGroup(
group.Name,
group.Description,
new List<ThreeLetterAbbreviation>
{
group.Tlas.First(tla => tla.Name.Name.Equals(name))
}
))
.ToList();
}

public async Task<TLAGroup> FindGroupByNameAsync(string name)
{
return FilterTlaStatus(await GetGroupByNameAsync(name), TLAStatus.Accepted);
}

public async Task<TLAGroup> AddTlaGroupAsync(TLAGroup tlaGroup)
{
if (await TlaGroupAlreadyExistsAsync(tlaGroup.Name))
Expand Down