softwaremill / softwaremill/tapir

[Feature Request] codegen: add support for suffixed content types

Open
#5,494 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.5k
Forks
468
Avg merge
5h 37m
Merged PRs (30d)
34

Description

Hello maintainers.

Once again thank you for the work on codegen.
I have been using it, and came to realize that RFC6839 suffixed content types are not supported.

These are application/XXX+json or application/XXX+xml.

These are used in a variety of standards, like:

  • RFC6902: application/json-patch+json
  • RFC7396: application/merge-patch+json
  • RFC9457: application/problem+xml & application/problem+json

Since the part before the suffix is only for semantic meanings, it is coherent to have the generate treat them as their standard format counterparts.

I have worked on an implementation, let me know if you wish me to open the PR.

Thank you for your time

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the codegen content-type handling and review the linked implementation comparison to understand the intended change. Verify that application/XXX+json and application/XXX+xml are treated like their standard JSON and XML counterparts, including the RFC examples in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.