MicroShed / MicroShed/microshed-testing

Would like the ability to calculate a base path from a JAX-RS Application type in a specific package, unrelated to @RESTClient type

Open
#229 4 comments 0 reactions 0 assignees View on GitHub
is:enhancement
Dominant language
Java
Stars
68
Forks
25
Avg merge
1d 21h
Merged PRs (30d)
6

Description

I'd like to be able to use:

@RESTClient
public static StarterResource appService;

but to use an Application from some other package.

import javax.ws.rs.core.Application;

@ApplicationPath("/api")
public class StarterApplication extends Application {

At the moment, MST will start from the Resource class and look for an Application in the same package, (understandably not wanting to scan the whole classloader tree).

Interested to hear ideas here on how this could fit into MST config or extension.

This basic mapping strikes me as maybe one that could have come up in other JAX-RS-related contexts, but admit I haven't done much resource to see if there's something already to build off of (completely separate from MST).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing MST's current resource and Application discovery behavior, then reproduce the example with StarterResource and StarterApplication in different packages. A complete change would let the RESTClient-based lookup use the selected Application's @ApplicationPath without requiring both types to share a package; the issue does not name files or tests.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.