Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add friendly formatting to two-part tariff endpoint #344

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

StuAA78
Copy link
Contributor

@StuAA78 StuAA78 commented Aug 8, 2023

https://eaflood.atlassian.net/browse/WATER-4046

We update our two-part tariff endpoint to output data in a friendlier format, optionally allowing us to view the raw data if specified.

The endpoint is still /check/two-part/{region} but it now takes an optional /{format} path parameter, eg /check/two-part/1/raw. We default to friendly output if nothing is specified, which is currently a simple { "hello": "world" } response but will ultimately be in a format similar to the UI. raw format simply shows the end result of the db queries and matching without any further changes. Any other format value returns an error response.

We update our two-part tariff endpoint to ouput data in a friendlier format, optionally allowing us to view the raw data if specified.
@StuAA78 StuAA78 added the enhancement New feature or request label Aug 8, 2023
@StuAA78 StuAA78 self-assigned this Aug 8, 2023
@StuAA78 StuAA78 marked this pull request as ready for review August 8, 2023 16:35
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

@StuAA78 StuAA78 merged commit 117e689 into main Aug 8, 2023
@StuAA78 StuAA78 deleted the add-friendly-formatting-to-2pt-endpoint branch August 8, 2023 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants