spring-projects / spring-projects/spring-framework
Support JSON Pointer in @HttpExchange interface
Open
Nobody has claimed this yet.
in: web
type: enhancement
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
Sometimes we need extract data from child node instead of root document.
For example get index mappings from ElasticSearch:
@HttpExchange("http://localhost:9200")
public interface ElasticSearchIndexOperations {
@GetExchange("/{index}/_mapping")
@JsonPointer("/${index}/mappings")
Mappings getMapping(@PathVariable String index);
}
NOTE: placeholders in @JsonPointer("/${index}/mappings") need to be resolved base on method parameters.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the @HttpExchange interface response handling and the proposed @JsonPointer annotation. Check how method parameters such as @PathVariable are resolved, then define completion as extracting the requested child node and resolving ${index} from method parameters, as shown in the Elasticsearch example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, json, spring
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100