> On Nov 2, 2023, at 11:42 AM, Veniamin Gvozdikov > <[email protected]> wrote: > > I'm trying to use the CXF feature > https://cxf.apache.org/docs/swagger2feature.html on fortress 3.0.0 to get > API access over swagger interface. I've already added these lines but I > don't understand where I need to turn the feature on in java code. Could > you please give me some advice on this? >
Hello Veniamin, Welcome to our mailing list. Out of the two questions you sent me (before I redirected you here), this is the question that I don’t know the answer. (So, create a new thread here with your other question) I did a little research on Swagger … First, are you trying to get Swagger to produce a document of the Fortress REST APIs? I’m assuming the answer is yes, but want to be sure. I may refer this question to our dev list as someone there may have experience. I’ll also do more digging and see what I can come up with. So, I definitely want to help. — Shawn > --- a/src/main/resources/applicationContext.xml > +++ b/src/main/resources/applicationContext.xml > @@ -46,6 +46,12 @@ under the License. > </bean> > > <bean id="fortressResponseInterceptor" > class="org.apache.directory.fortress.rest.FortressResponseInterceptor"/> > + > + <!-- CXF Swagger2Feature --> > + <bean id="swagger2Feature" > class="org.apache.cxf.jaxrs.swagger.Swagger2Feature"> > + <!-- customize some of the properties --> > + <property name="basePath" value="/app/swaggerSample"/> > + </bean> > > <jaxrs:server id="restContainer" address="/"> > <jaxrs:serviceBeans> > @@ -67,6 +73,11 @@ under the License. > <jaxrs:providers> > <ref bean="customJsonProvider"/> > </jaxrs:providers> > + > + <!-- Swagger --> > + <jaxrs:features> > + <ref bean="swagger2Feature" /> > + </jaxrs:features> > </jaxrs:server> > > </beans> > > -- > Regards, > Veniamin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
