OpenAPITools / OpenAPITools/openapi-generator

[REQ][Kotlin-Client][Retrofit2] Added `Sandwich` for use with Retrofit2.

Open
#15,004 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

Added response wrapper library for use with Retrofit. Sandwich
It is a library that many people are already using, and it would be nice if open-api-generator also supports it.

Describe the solution you'd like

After adding useSandwich flag, if set to use, change API return type to ApiResponse provided by Sandwich.

Additional context

Sandwich takes care of all the networking handling that developers would otherwise have to do manually, it cuts a lot of boilerplate code out of the code.

Contributor guide

Open the contributing guide

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 with the Kotlin client’s Retrofit2 generator and inspect how configuration flags and generated API return types are handled. Done means a useSandwich option produces Sandwich ApiResponse return types while generation without the option remains unchanged; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.