Skip to content

CCM-11188 Implement patch /letter/id API #128

Merged
francisco-videira-nhs merged 69 commits intomainfrom
feature/CCM-11188
Sep 26, 2025
Merged

CCM-11188 Implement patch /letter/id API #128
francisco-videira-nhs merged 69 commits intomainfrom
feature/CCM-11188

Conversation

@francisco-videira-nhs
Copy link
Copy Markdown
Contributor

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@francisco-videira-nhs francisco-videira-nhs requested review from a team as code owners August 22, 2025 08:28
Comment thread lambdas/api-handler/src/contracts/errors.ts Outdated
Comment thread lambdas/api-handler/src/errors/index.ts
Comment thread lambdas/api-handler/src/contracts/errors.ts
Comment on lines +18 to +21
...(letterBase.reasonCode && { reasonCode: letterBase.reasonCode }),
...(letterBase.reasonText && { reasonText: letterBase.reasonText })
}
};
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OAS for the letter list endpoint doesn't include reason code or reason test - given that these would irrelevant to a letter list operation GET /letters

It is present on the get status GET /letter/{id}

This is probably fine in that PENDING letters won't have reason codes but might be worth additional caution

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GET /letter OAS has reasonCode and reasonText in the response schema currently. If it's not supposed to return these then we need to tweak the OAS to reflect this
image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove reasonCode and reasonText for get letters response

Copy link
Copy Markdown
Contributor

@masl2 masl2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a pass to make sure the responses are in line with the OAS. Things I've spotted:

  • GET /letters doesn't include reason data in the response
  • Error responses need to match the OAS. e.g. Resource not found, Invalid request
  • Not sure the 400 response has made it across from the GET changes into the OAS? (the spec doesn't seem to cover the LIMIT errors responses now)

@sonarqubecloud
Copy link
Copy Markdown


destination_arn = "arn:aws:logs:${var.region}:${var.shared_infra_account_id}:destination:nhs-main-obs-firehose-logs"

common_db_access_lambda_env_vars = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit picky but these are common envars, but not db specific anymore

@francisco-videira-nhs francisco-videira-nhs merged commit 2b862fd into main Sep 26, 2025
40 checks passed
@francisco-videira-nhs francisco-videira-nhs deleted the feature/CCM-11188 branch September 26, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants