Chaz,

I have JSON endpoints in karat 4.4.3 using annotations see 
https://lists.apache.org/thread/bfpvpw5kx52vk49kpoo5ztolsh8j2j9f

Some information that will make it easier to assist:

1) What are the versions of 
 - Karaf
- Swagger

2) What entries are you seeing in the karaf log file?
- When you component start.  ( I would expect the endpoint and path to be 
logged)
- When you make a http request to the end point
- Web related errors

Per you testing question I do not use Swagger UI, but the REST test in karaf 
tests is a place to start.
    
https://github.com/apache/karaf/blob/karaf-4.4.6/itests/test/src/test/java/org/apache/karaf/itests/examples/RestExampleTest.java

Paul Spencer 

> On Nov 13, 2024, at 7:43 PM, apache-karaf-user.pyr3x.com via user 
> <user@karaf.apache.org> wrote:
> 
> On Tue, Nov 12, 2024 at 11:46:29AM -0500, apache-karaf-user.pyr3x.com via 
> user wrote:
>> On Sun, Nov 10, 2024 at 07:05:33AM -0500, apache-karaf-user.pyr3x.com via 
>> user wrote:
>>> On Tue, Nov 05, 2024 at 12:07:50PM -0500, apache-karaf-user.pyr3x.com via 
>>> user wrote:
>>>> Hello,
>>>> 
>>>> I'm running Karaf and have installed the the following features:
>>>> 
>>>> 'aries-jax-rs-whiteboard-whiteboard'
>>>> 'aries-jax-rs-whiteboard-openapi'
>>>> 
>>>> I have a class with the following annotations:
>>>> 
>>>> @Component(
>>>>    service = {Blah.class, OpenAPI.class},
>>>>    immediate = true,
>>>>    configurationPolicy = ConfigurationPolicy.OPTIONAL)
>>>> @OpenAPIDefinition(info =
>>>>    @Info(
>>>>      title = "${project.name}",
>>>>      version = "${project.version}"
>>>>    )
>>>> )
>>>> @Path("coolapp")
>>>> @JaxrsResource
>>>> @Consumes(MediaType.APPLICATION_JSON)
>>>> @Produces(MediaType.APPLICATION_JSON)
>>>> @JSONRequired
>>>> @Designate(ocd = Configuration.class)
>>>> @Slf4j
>>>> public class Blah extends OpenAPI {
>>>> 
>>>> 
>>>> I can access the openapi.yaml at http://localhost:8181/openapi.yaml
>>>> 
>>>> How do I make use of the swagger-ui to test my endpoints?
>>>> 
>>>> I've tried to install the feature to add it:
>>>> 
>>>> 'feature:info cxf-rs-description-openapi-v3'
>>>> 
>>>> But can't seem to find the endpoint where it's running (if it is)
>>>> 
>>>> Any help would be appreciated!
>>>> 
>>>> -- 
>>>> Chaz
>>> 
>>> ping
>>> 
>>> -- 
>>> Chaz
>> 
>> ping :(
>> 
>> -- 
>> Chaz
> 
> anyone?
> 
> -- 
> Chaz

Reply via email to