OpenFeign / OpenFeign/feign

Add typed response

Open
#1,627 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

proposal waiting for votes
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

For now working with response scan be do via two ways:

import feign.Response

@RequestLine("GET /dtos")
public MyDto dtos()

@RequestLine("GET /dtos")
public Response dtos()

But what if I need both headers and MyDto parsed? I think it is better to have an additional class like ResponseTyped which is the same as Response but instead of body has MyDto parsed.

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 by reviewing the existing Response type and the MyDto return and decoding examples described in the issue. Determine how headers and a parsed MyDto should coexist, then define the ResponseTyped API and its expected decoding behavior; done means both headers and the typed response are available to callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.