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

Anti-pattern: API must have client-agnostic representation #1305

Open
sldblog opened this issue Nov 8, 2022 · 0 comments
Open

Anti-pattern: API must have client-agnostic representation #1305

sldblog opened this issue Nov 8, 2022 · 0 comments

Comments

@sldblog
Copy link
Contributor

sldblog commented Nov 8, 2022

fun from(changelog: Changelog, userDetail: UserDetail): ChangelogValuesDTO {
val dateTimeFormatter = DateTimeFormatter.ofPattern("dd MMM yyyy 'at' h.mma")

Avoid: non-standard, human-readable representation of values

Do: use standard representation (ISO8601) and delegate formatting to the API client

@sldblog sldblog changed the title API must have client-agnostic representation Anti-pattern: API must have client-agnostic representation Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant