Skip to content

Commit 0dd8c92

Browse files
authored
Fix broken Markdown references (#216)
## Changes Fix various broken Markdown [links that are now being reported by the infra template's Markdown Link Checker CI](https://github.com/navapbc/pfml-starter-kit-app/actions/runs/7202268166/job/19620064707).
1 parent db2421e commit 0dd8c92

File tree

4 files changed

+6
-27
lines changed

4 files changed

+6
-27
lines changed

docs/app/api-details.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,6 @@ See [Technical Overview](./technical-overview.md) for details on the technologie
44

55
Each endpoint is configured in the [openapi.generated.yml](/app/openapi.generated.yml) file which provides basic request validation. Each endpoint specifies an `operationId` that maps to a function defined in the code that will handle the request.
66

7-
To make handling a request easier, an [ApiContext](/app/src/util/api_context.py) exists which will fetch the DB session, request body, and current user. This can be used like so:
8-
```py
9-
def example_post() -> flask.Response:
10-
with api_context_manager() as api_context:
11-
# Work with the request body
12-
first_name = api_context.request_body["first_name"]
13-
14-
# Work with the user
15-
current_user = api_context.current_user
16-
17-
# Work with the DB session
18-
api_context.db_session.query(..)
19-
20-
# Return a response
21-
return response_util.success_response(
22-
message="Success",
23-
data={"db_model_id": "1234"}, # Whatever the response object should be
24-
status_code=201
25-
)
26-
```
27-
For more complex usages, it is recommended you put the implementation into a separate handler file in order to keep the API entrypoints easier to read.
28-
297
# Swagger
308

319
The Swagger UI can be reached locally at [http://localhost:8080/docs](http://localhost:8080/docs) when running the API. The UI is based on the [openapi.generated.yml](/app/openapi.generated.yml) file.
@@ -39,7 +17,7 @@ All model schemas defined can be found at the bottom of the UI.
3917
# Routes
4018

4119
## Health Check
42-
[GET /v1/healthcheck](/app/src/route/healthcheck.py) is an endpoint for checking the health of the service. It verifies that the database is reachable, and that the API service itself is up and running.
20+
[GET /v1/healthcheck](/app/src/api/healthcheck.py) is an endpoint for checking the health of the service. It verifies that the database is reachable, and that the API service itself is up and running.
4321

4422
Note this endpoint explicitly does not require authorization so it can be integrated with any automated monitoring you may build.
4523

docs/app/database/database-access-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This document describes the best practices and patterns for how the application
44

55
## Client Initialization and Configuration
66

7-
The database client is initialized when the application starts (see [src/\_\_main\_\_.py](../../../app/src/app.py). The database engine that is used to create acquire connections to the database is initialized using the database configuration defined in [db_config.py](../../../app/src/db/db_config.py), which is configured through environment variables. The initialized database client is then stored on the Flask app's [\`extensions\` dictionary](https://flask.palletsprojects.com/en/2.2.x/src/#flask.Flask.extensions) to be used throughout the lifetime of the application.
7+
The database client is initialized when the application starts (see [`src/__main__.py`](../../../app/src/app.py)). The database engine that is used to acquire connections to the database is initialized using the database configuration defined in [postgres_config.py](../../../app/src/adapters/db/clients/postgres_config.py), which is configured through environment variables. The initialized database client is then stored on the Flask app's [`extensions` dictionary](https://flask.palletsprojects.com/en/2.2.x/extensions/) to be used throughout the lifetime of the application.
88

99
## Session Management
1010

docs/app/database/database-management.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ $ make db-migrate
6161
<details>
6262
<summary>Example: Adding a new column to an existing table:</summary>
6363

64-
1. Manually update the database models with the changes ([example_models.py](/app/src/db/models/example_models.py) in this example)
64+
1. Manually update the database models with the changes
6565
```python
66+
# src/db/models/example_models.py
67+
6668
class ExampleTable(Base):
6769
...
6870
my_new_timestamp = Column(TIMESTAMP(timezone=True)) # Newly added line

docs/app/technical-overview.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
- [Request operations](#request-operations)
55
- [Authentication](#authentication)
66
- [Authorization](#authorization)
7-
- [Running In Hosted Environments](#running-in-hosted-environments)
8-
- [ECS](#ecs)
97

108
## Key Technologies
119

@@ -38,6 +36,7 @@ generally preferred.
3836
[sqlalchemy-src]: https://github.com/sqlalchemy/sqlalchemy
3937

4038
[alembic-home]: https://alembic.sqlalchemy.org/en/latest/
39+
[alembic-src]: https://github.com/sqlalchemy/alembic
4140

4241
## Request operations
4342

0 commit comments

Comments
 (0)