Skip to content

fix: resolve Ktor JSON serialization, missing compiler plugin, and discount calculation bugs - #12

Open
harsh786 wants to merge 2 commits into
venture-falcon:chore/add-code-testfrom
harsh786:BUG-FiXES
Open

fix: resolve Ktor JSON serialization, missing compiler plugin, and discount calculation bugs#12
harsh786 wants to merge 2 commits into
venture-falcon:chore/add-code-testfrom
harsh786:BUG-FiXES

Conversation

@harsh786

@harsh786 harsh786 commented Jul 1, 2026

Copy link
Copy Markdown

Summary

This PR fixes three bugs identified during testing of the discount service.

Bugs Fixed

  1. Ktor JSON 406 Not Acceptable – Installed ContentNegotiation + kotlinx.serialization JSON plugin on the server so GET /products?country=Sweden returns JSON correctly.
  2. Missing Kotlin serialization compiler plugin – Added the plugin to the build so @Serializable models have generated serializers available at runtime.
  3. Incorrect discount calculation – Fixed discount application to be multiplicative and sequential (as per requirements and tests), not additive.

Files Changed

  • FIXES.md – Full bug report with root cause and fix details

Harsh Kumar (12204) and others added 2 commits July 1, 2026 00:25
…scount calculation bugs

- Install Ktor content negotiation + kotlinx JSON to fix 406 on GET /products?country=Sweden
- Add Kotlin serialization compiler plugin for @serializable runtime support
- Fix discount application to be multiplicative (sequential) instead of additive

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant