guardrail-dev / guardrail-dev/guardrail

Support for other json derived content types

Open
#1,119 5 comments 3 reactions 0 assignees View on GitHub
core enhancement good first issue help wanted
Dominant language
Scala
Stars
541
Forks
138
PR merge metrics
No merged PRs in 30d

Description

I noticed there's no way to configure or allow the client/server generator to allow to support more than just the traditional `application/json` encoder.
Just on the Akka MediaTypes singleton there are these 3, e.g.:
* `application/json-patch+json`
* `application/merge-patch+json`
* `application/problem+json`

I'm more than happy to open a PR, but wanted to see if this is something in the scope of this library.

Ref:
https://github.com/guardrail-dev/guardrail/blob/9646130eaa7c344b58a93a5f8cdf7ac6a883a0ac/modules/codegen/src/main/scala/com/twilio/guardrail/generators/Scala/AkkaHttpGenerator.scala#L195

Contributor guide

Open the contributing guide

Research direction

Start with modules/codegen/src/main/scala/com/twilio/guardrail/generators/Scala/AkkaHttpGenerator.scala around line 195, then review how the client/server generator handles application/json. Compare the requested JSON-derived media types with the existing configuration path and determine the intended scope before making changes. Done means the generator can support the listed content types without regressing traditional application/json handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.