Displaying #apache-syncope/2017-05-11.log:

Thu May 11 05:50:37 2017  ilgrosso:Joined the channel
Thu May 11 06:54:59 2017  andreapatricelli:Joined the channel
Thu May 11 07:02:52 2017  svizzero81:Joined the channel
Thu May 11 07:18:17 2017  fmartelli:Joined the channel
Thu May 11 08:08:41 2017  coheigea:Joined the channel
Thu May 11 08:33:36 2017  sberyozkin:Joined the channel
Thu May 11 09:07:57 2017  ilgrosso:sberyozkin: ping
Thu May 11 09:15:30 2017  sberyozkin:ilgrosso: Hi Francesco, sorry, meant to ping you too :-)
Thu May 11 09:15:49 2017  ilgrosso:I've read your comment in https://issues.apache.org/jira/browse/CXF-7316 and attempting to make things work, with Swagger 1.5.12 and CXF 3.1.12-SNAPSHOT
Thu May 11 09:16:45 2017  ilgrosso:I have essentially turned https://github.com/apache/syncope/blob/2_0_X/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/ExtendedSwagger2Serializers.java into a class extending Swagger2Customizer
Thu May 11 09:17:37 2017  sberyozkin:ilgrosso: and did it work ?
Thu May 11 09:18:04 2017  ilgrosso:then turned https://github.com/apache/syncope/blob/2_0_X/core/rest-cxf/src/main/resources/restCXFContext.xml#L100-L115 into https://pastebin.com/xY6Eqka8
Thu May 11 09:18:16 2017  ilgrosso:in theory it should have worked, no?
Thu May 11 09:18:20 2017  ilgrosso:but I got
Thu May 11 09:18:41 2017  ilgrosso:java.lang.NullPointerException: null
Thu May 11 09:18:41 2017  ilgrosso: at org.apache.cxf.jaxrs.swagger.Swagger2Customizer.customize(Swagger2Customizer.java:91) ~[cxf-rt-rs-service-description-swagger-3.1.12-SNAPSHOT.jar:3.1.12.SNAPSHOT]
Thu May 11 09:18:41 2017  ilgrosso: at org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers.writeTo(DefaultSwagger2Serializers.java:51) ~[cxf-rt-rs-service-description-swagger-3.1.12-SNAPSHOT.jar:3.1.12.SNAPSHOT]
Thu May 11 09:18:41 2017  ilgrosso: at org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers.writeTo(DefaultSwagger2Serializers.java:39) ~[cxf-rt-rs-service-description-swagger-3.1.12-SNAPSHOT.jar:3.1.12.SNAPSHOT]
Thu May 11 09:18:41 2017  ilgrosso: at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1390) ~[cxf-rt-frontend-jaxrs-3.1.12-SNAPSHOT.jar:3.1.12.SNAPSHOT]
Thu May 11 09:19:09 2017  ilgrosso:anything evident I am doing wrong?
Thu May 11 09:22:06 2017  sberyozkin:ilgrosso: "for (final Map.Entry<String, Path> entry : data.getPaths().entrySet()) {" - NPE is on this line
Thu May 11 09:22:23 2017  ilgrosso:maybe data.getPaths()?
Thu May 11 09:22:51 2017  sberyozkin:ilgrosso: yes, but it is coming from Swagger
Thu May 11 09:23:14 2017  ilgrosso:sberyozkin: hum, ok but why this should have changed?
Thu May 11 09:30:30 2017  sberyozkin:ilgrosso: I've been looking at the code changes at the CXF level and can not spot anything that could've caused it
Thu May 11 09:31:32 2017  sberyozkin:ilgrosso: can you please try to compare what is diff with CXF 3.1.11 and 3.1.12-SNAPSHOT as far as the code running inside DefaultSwagger2Serilaizerrs is concerned
Thu May 11 09:31:45 2017  sberyozkin:ilgrosso: it is effectively the same now...
Thu May 11 09:31:51 2017  ilgrosso:sberyozkin: I will, it is going to take some time...
Thu May 11 09:33:25 2017  sberyozkin:ilgrosso: sorry, unfortunately I don't think we'll get anything positive back from Swagger team re reinstalling the support for the serializers but frezing Swagger support to 1.5.12 in CXF 3.1.x would be probably be too problematic
Thu May 11 09:37:11 2017  sberyozkin:ilgrosso: I can simply keep Default2Serializers as is in 3.1.x if you think it is too problematic to move most of its code to Swagger2Customizer. But once CXF 3.1.x moves to 1.5.13 at some point of time then it would be needed anyway
Thu May 11 09:37:51 2017  ilgrosso:sberyozkin: moving the code is trivial, no problems
Thu May 11 09:37:58 2017  ilgrosso:...if it only worked :-)
Thu May 11 09:41:10 2017  sberyozkin:ilgrosso: please check that the serializer is having the same initial filed values in CXF 3.1.11 (in itself) and 3.1.12-SNAPSHOT (in the customizer)
Thu May 11 09:41:33 2017  sberyozkin:ilgrosso: I might've made some silly typo somewhere
Thu May 11 10:09:56 2017  fmartelli:Joined the channel
Thu May 11 10:29:12 2017  ilgrosso:sberyozkin: is there any chance that Swagger2Feature#addSwaggerResource is not invoked at all?
Thu May 11 10:30:07 2017  ilgrosso:maybe I did something really stupid, but I have started Tomcat with Syncope, attached the JPDA debugger and set breakpoint there..
Thu May 11 10:33:06 2017  sberyozkin:ilgrosso: it must be something else, you'd not get NPE there if it were the case; can you show me please how is swagger2Feature and defaultserializers are configured with CXF 3.1.11 ?
Thu May 11 10:33:25 2017  ilgrosso:https://github.com/apache/syncope/blob/2_0_X/core/rest-cxf/src/main/resources/restCXFContext.xml#L100-L115
Thu May 11 10:37:13 2017  sberyozkin:ilgrosso: Looks identical between then and now, I was concerned may be dynamicPathvalue is messed up in CXF, but nothing changed really in the way it is set up
Thu May 11 10:38:55 2017  sberyozkin:ilgrosso: I wonder does the fact you do not see Swagger2Feature add
Thu May 11 10:39:15 2017  sberyozkin:ilgrosso: I wonder does the fact you do not see Swagger2Feature addResource, does it mean there's some mix in issue ?
Thu May 11 10:40:13 2017  ilgrosso:sberyozkin: I am no trying to "instrument" (e.g. System.out.println..) a local copy of AbstractSwaggerFeature to see if it actually invoked and how
Thu May 11 10:48:38 2017  fmartelli:Joined the channel
Thu May 11 10:54:40 2017  ilgrosso:sberyozkin: I see now that addSwaggerResource is called during startup, and that customizer was NULL because I was passing it to DefaultSwagger2Serializers, not to Swagger2Feature
Thu May 11 10:54:53 2017  ilgrosso:still NPE, btw :-/
Thu May 11 10:58:47 2017  sberyozkin:ilgrosso: I can revert 3.1.x changes if you get stuck with it
Thu May 11 10:59:09 2017  ilgrosso:sberyozkin: no need for the moment, we're still on 3.1.11 :-)
Thu May 11 10:59:18 2017  ilgrosso:I am experimenting locally with 3.1.12-SNAPSHOT
Thu May 11 10:59:26 2017  ilgrosso:can you explain https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java#L173
Thu May 11 10:59:27 2017  ilgrosso:?
Thu May 11 10:59:57 2017  ilgrosso:I mean, why no provider is added when there is a customizer?
Thu May 11 11:00:26 2017  sberyozkin:ilgrosso: it is kind of 1.5.13 mode
Thu May 11 11:00:41 2017  sberyozkin:ilgrosso: with 1.5.13 the serializers will not be checked at all
Thu May 11 11:00:57 2017  sberyozkin:ilgrosso: with 1.5.13 only the customizer is effective on its own
Thu May 11 11:01:50 2017  sberyozkin:ilgrosso: so if someone wants to try 1.5.13 then they set customizer directly on Swagger2Feature which will be a signal that serializers will not be used
Thu May 11 11:02:13 2017  ilgrosso:I am now trying
Thu May 11 11:02:13 2017  ilgrosso: <bean id="swagger2Feature" class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
Thu May 11 11:02:13 2017  ilgrosso: <property name="title" value="Apache Syncope"/>
Thu May 11 11:02:13 2017  ilgrosso: <property name="version" value="${syncope.version}"/>
Thu May 11 11:02:13 2017  ilgrosso: <property name="description" value="Apache Syncope ${syncope.version}"/>
Thu May 11 11:02:14 2017  ilgrosso: <property name="contact" value="dev@syncope.apache.org"/>
Thu May 11 11:02:17 2017  ilgrosso:
Thu May 11 11:02:19 2017  ilgrosso: <property name="resourcePackage" value="org.apache.syncope.common.rest.api.service"/>
Thu May 11 11:02:21 2017  ilgrosso: <property name="scanAllResources" value="true"/>
Thu May 11 11:02:23 2017  ilgrosso: <property name="activateOnlyIfJaxrsSupported" value="true"/>
Thu May 11 11:02:25 2017  ilgrosso:
Thu May 11 11:02:27 2017  ilgrosso:<!-- <property name="customizer" ref="swagger2customizer"/>
Thu May 11 11:02:30 2017  ilgrosso: <property name="swagger2Serializers" ref="swagger2Serializers"/>-->
Thu May 11 11:02:32 2017  ilgrosso: </bean>
Thu May 11 11:02:39 2017  ilgrosso:e.g. with no customizer nor serializer
Thu May 11 11:02:58 2017  ilgrosso:and /syncope/rest/swagger.json returns no REST endpoints at all
Thu May 11 11:03:31 2017  ilgrosso:e.g. https://pastebin.com/Fk650sAu
Thu May 11 11:03:32 2017  sberyozkin:ilgrosso: in this case Default serialziers will be created without any customizations
Thu May 11 11:03:46 2017  ilgrosso:yes, so I would expect no javadocs
Thu May 11 11:03:58 2017  ilgrosso:while here I have just empty
Thu May 11 11:04:14 2017  ilgrosso:it seems that the JAX-RS annotated interfaces are not considered at all
Thu May 11 11:04:41 2017  sberyozkin:ilgrosso: but in Syncope case you do set a custom serializers ?
Thu May 11 11:05:02 2017  ilgrosso:the configuration I am running now is as above
Thu May 11 11:05:15 2017  sberyozkin:ilgrosso: I have the CXF tests and spring_boot demo returning me all what is expected
Thu May 11 11:05:19 2017  ilgrosso:only <property name="resourcePackage" value="org.apache.syncope.common.rest.api.service"/>
Thu May 11 11:05:20 2017  ilgrosso: <property name="scanAllResources" value="true"/>
Thu May 11 11:05:20 2017  ilgrosso: <property name="activateOnlyIfJaxrsSupported" value="true"/>
Thu May 11 11:05:29 2017  ilgrosso:no serializers, nothing else
Thu May 11 11:05:51 2017  sberyozkin:ilgrosso: would you like me to revert 3.1.x changes :-) ?
Thu May 11 11:06:11 2017  ilgrosso:sberyozkin: I think it is good to be prepared for 1.5.13
Thu May 11 11:06:50 2017  ilgrosso:remember we are not using Swagger annotations on our interface methods, only JAX-RS
Thu May 11 11:06:58 2017  ilgrosso:did something change WRT this?
Thu May 11 11:07:21 2017  sberyozkin:ilgrosso: are you trying 1.5.13 now ?
Thu May 11 11:08:08 2017  ilgrosso:no no, still with 1.5.12
Thu May 11 11:10:06 2017  sberyozkin:ilgrosso: the only thing that has changed is https://github.com/apache/cxf/commit/016140cc85a5c05ec762d4e4e092c259f76eb922
Thu May 11 11:13:45 2017  ilgrosso:sberyozkin: ATM I have left out any possible Syncope customization, only using "vanilla" Swagger2Feature - naturally, with scanAllResources / resourcePackage set, and NOT using Swagger annotations
Thu May 11 11:14:06 2017  ilgrosso:then I would expect CXF to produce some unstructured JSON with all REST endpoints
Thu May 11 11:14:22 2017  ilgrosso:but I got just empty
Thu May 11 11:17:09 2017  sberyozkin:ilgrosso: that looks like a diff issue to that NPE you are seeing, one thing I know of Swagger JAXRS can't work with Api on the root resource classes
Thu May 11 11:18:38 2017  ilgrosso:I am now doing something different
Thu May 11 11:18:46 2017  ilgrosso:just checked out 65fe9815a1ada880343ea022ec83f81d676c3367
Thu May 11 11:18:56 2017  ilgrosso:e.g. the commit before https://github.com/apache/cxf/commit/016140cc85a5c05ec762d4e4e092c259f76eb922
Thu May 11 11:19:07 2017  ilgrosso:and now trying without swagger2Serializers
Thu May 11 11:19:50 2017  ilgrosso:just to sww how it used to work without any customization
Thu May 11 11:21:15 2017  ilgrosso:...and the result is veeeery different https://pastebin.com/4RHDVDC8
Thu May 11 11:21:31 2017  ilgrosso:as I was expecting, 'paths' is populated
Thu May 11 11:22:28 2017  fmartelli:Joined the channel
Thu May 11 11:23:08 2017  sberyozkin:ilgrosso: I'm just wondering is it because I removed 'final' from 'final Swagger data' and even though it compiles it is still kind of effective
Thu May 11 11:23:28 2017  sberyozkin:ilgrosso: let me do one tweak
Thu May 11 11:29:21 2017  sberyozkin:ilgrosso: just redeployed 3.1.12-SNAPSHOT cxf-rt-rs-description-swagger
Thu May 11 11:29:47 2017  sberyozkin:ilgrosso: I wonder if something funny was happening with that 'final'
Thu May 11 11:35:31 2017  ilgrosso:let me pull and rebuild localy....
Thu May 11 11:39:50 2017  ilgrosso:no changes, still empty 'paths'
Thu May 11 11:42:40 2017  sberyozkin:ilgrosso: I'd try first get to that NPE issue somehow
Thu May 11 11:43:03 2017  ilgrosso:the NPE issue is caused by the fact that no paths are returned
Thu May 11 11:43:16 2017  ilgrosso:if no paths are returned, there is no point in having Swagger at all
Thu May 11 11:43:39 2017  sberyozkin:ilgrosso: so where do you think the problem is ?
Thu May 11 11:44:38 2017  ilgrosso:sberyozkin: to me it is in the fact thatr Swagger - possibly because there was something missing in the latest commits - is not able to construct its specs out of JAX-RS annotated classes
Thu May 11 11:44:40 2017  ilgrosso:(with no swagger proprietary annotations)
Thu May 11 11:47:57 2017  sberyozkin:ilgrosso: well, I don't know as I said I tried spring boot demo and it all works fine. I guess we have 2 options 1) I restore the original 3.1.11 DefaultSerializersCode or 2) you can try to get to the bottom of why it is not working with Syncope with 3.1.12-SNAPSHOT
Thu May 11 11:48:40 2017  ilgrosso:sberyozkin: I can spend some more time on that, but can you please confirm that the spring boot demo is not using Swagger annotations? e.g. @Api
Thu May 11 11:49:08 2017  sberyozkin:ilgrosso: it is using Api on the root resources
Thu May 11 11:49:22 2017  ilgrosso:...can you try without that?
Thu May 11 11:49:36 2017  ilgrosso:well, without any Swagger annotation, possibly
Thu May 11 11:49:37 2017  sberyozkin:ilgrosso: I've already tried and did not work
Thu May 11 11:49:56 2017  sberyozkin:ilgrosso: before my last change
Thu May 11 11:50:01 2017  ilgrosso:sberyozkin: ..so?
Thu May 11 11:50:19 2017  sberyozkin:ilgrosso: so what ?
Thu May 11 11:51:02 2017  ilgrosso:sberyozkin: I mean, I am sure that *before* your changes from https://github.com/apache/cxf/commit/016140cc85a5c05ec762d4e4e092c259f76eb922, Syncope REST classes used to be picked up - and we are not using @Api
Thu May 11 11:51:16 2017  ilgrosso:now, after such changes, they are not picked up any more
Thu May 11 11:51:52 2017  ilgrosso:sberyozkin: just attempting to hint the direction to fix such problem
Thu May 11 11:51:58 2017  sberyozkin:ilgrosso: are you saying you'd like me to go for option 1 ?
Thu May 11 11:52:07 2017  ilgrosso:sberyozkin: no
Thu May 11 11:52:39 2017  ilgrosso:could you please point me to the spring boot demo?
Thu May 11 11:53:18 2017  sberyozkin:ilgrosso: as you can see from my commit I did only move the code from the serializers class to the helper, and I can not spot what else might've caused it
Thu May 11 11:53:25 2017  sberyozkin:ilgrosso: 1 sec
Thu May 11 11:54:47 2017  sberyozkin:ilgrosso: https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot
Thu May 11 12:01:04 2017  ilgrosso:sberyozkin: so I run the spring boot demo from the 3.1.x-fixes branch
Thu May 11 12:02:15 2017  ilgrosso:this is what I get when accessing http://localhost:8080/services/helloservice/swagger.json - https://pastebin.com/YcAQY6WW
Thu May 11 12:02:27 2017  ilgrosso:looks fine
Thu May 11 12:03:11 2017  ilgrosso:when I comment out @Api in HelloServiceImpl1 and HelloServiceImpl2 instead, accessing http://localhost:8080/services/helloservice I get https://pastebin.com/UY1kpZPR
Thu May 11 12:03:26 2017  ilgrosso:e.g. exactly what I am currently getting with Syncope
Thu May 11 12:03:51 2017  ilgrosso:so, the problem is not only with Syncope, is with any CXF application which not using @Api
Thu May 11 12:06:12 2017  sberyozkin:ilgrosso: as I said that is because swagger-jaxrs does not recognize JAX-RS resources without @Api on the class level
Thu May 11 12:06:30 2017  ilgrosso:but it does, with Syncope, if using CXF 3.1.11
Thu May 11 12:06:42 2017  ilgrosso:can you explain why?
Thu May 11 12:07:10 2017  sberyozkin:ilgrosso: no; it never worked for spring-boot
Thu May 11 12:07:37 2017  ilgrosso:well, with Syncope via Spring Boot, it does work too
Thu May 11 12:07:54 2017  ilgrosso:https://github.com/Tirasa/syncopeSpringBoot
Thu May 11 12:10:02 2017  sberyozkin:ilgrosso: and what does it prove ?
Thu May 11 12:10:15 2017  ilgrosso:with CXF 3.1.11, the Spring Boot demo works even without @Api if changing
Thu May 11 12:10:24 2017  ilgrosso: endpoint.setFeatures(Arrays.asList(new Swagger2Feature()));
Thu May 11 12:10:25 2017  ilgrosso:with
Thu May 11 12:10:30 2017  ilgrosso:Swagger2Feature feature = new Swagger2Feature();
Thu May 11 12:10:30 2017  ilgrosso: feature.setScanAllResources(true);
Thu May 11 12:10:30 2017  ilgrosso: feature.setResourcePackage("sample.rs.service");
Thu May 11 12:10:33 2017  ilgrosso:(as Syncope does)
Thu May 11 12:10:43 2017  ilgrosso:with CXF 3.1.12-SNAPSHOT, this does not happen
Thu May 11 12:12:07 2017  sberyozkin:ilgrosso: nonetheless I'm not sure how it is related to the change I did;
Thu May 11 12:12:22 2017  ilgrosso:sberyozkin: I am not sure too
Thu May 11 12:12:55 2017  ilgrosso:but a behavioral difference is matter of fact, between 3.1.11 and 3.1.12-SNAPSHOT, with same configuration
Thu May 11 12:15:32 2017  ilgrosso:sberyozkin: anyway now I have a faster lane to debug, rather than Syncope
Thu May 11 12:18:24 2017  svizzero81:Joined the channel
Thu May 11 12:18:34 2017  fmartelli:Joined the channel
Thu May 11 12:21:03 2017  fmartelli1:Joined the channel
Thu May 11 12:40:57 2017  sberyozkin:ilgrosso: I just copied 3.1.11 Swagger2Feature, DefaultSwagger2Serializers, SwaggerUiresolver and osgiSwaggerUiResolver to 3.1.12 SNAPSHOT and I still do not have spring_boot demo workin without @Api
Thu May 11 12:41:41 2017  sberyozkin:ilgrosso: which most likely indicates that something else that changed in 3.1.12-SNAPSHOT may be affecting it
Thu May 11 12:42:07 2017  ilgrosso:sberyozkin: did you also replace endpoint.setFeatures(Arrays.asList(new Swagger2Feature())); ?
Thu May 11 12:43:03 2017  sberyozkin:ilgrosso: yes I reproduced that with your spring boot demo updates I could not get it working with 3.1.12-SNAPSHOT
Thu May 11 12:43:12 2017  ilgrosso:sberyozkin: okie
Thu May 11 12:46:01 2017  sberyozkin:ilgrosso: I guess we'd need to look at the 3.1.12-snapshot history, it could be parent/pom.xml updates, or rt/frontend/jaxrs or /core changes to some utility code that Swagger2Feature may depend on
Thu May 11 12:46:17 2017  ilgrosso:sberyozkin: ouch, looks involved...
Thu May 11 12:46:43 2017  sberyozkin:ilgrosso: I can have a closer look too just a bit later on
Thu May 11 12:56:34 2017  sberyozkin:ilgrosso: I've never known it can work without @Api so nothing in CXF to enforce it works at the moment
Thu May 11 12:56:47 2017  ilgrosso:sberyozkin: :-)
Thu May 11 12:57:01 2017  ilgrosso:sberyozkin: I've always actually loved that feature
Thu May 11 12:57:31 2017  sberyozkin:ilgrosso: I'll finish some pending work and have a closer look at the 3.1.11 changes
Thu May 11 12:57:36 2017  sberyozkin:ilgrosso: I'll finish some pending work and have a closer look at the 3.1.12 changes
Thu May 11 13:04:11 2017  ilgrosso:sberyozkin: I've probably found the reason, but have no idea about how to fix
Thu May 11 13:04:58 2017  ilgrosso:in Swagger's ApiListingResource, the ServletContext is injected via @Context, but it is null
Thu May 11 13:05:32 2017  ilgrosso:as a result, the scan() method in its superclass does not find any ReaderConfig instance as ServletContext attribute
Thu May 11 13:06:25 2017  ilgrosso:where https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java#L403 has put it
Thu May 11 13:07:20 2017  ilgrosso:and thus no 'scanAllResources' is set, finally
Thu May 11 13:11:16 2017  sberyozkin:ilgrosso: I've glanced over 3.1.12 changes, can't see what may've affected it so far, will have a look later again, going for lunch :-)
Thu May 11 13:11:30 2017  ilgrosso:sberyozkin: buon appetito!
Thu May 11 13:12:10 2017  sberyozkin:ilgrosso: molte grazie :-)
Thu May 11 13:13:50 2017  ilgrosso:sberyozkin: for you analisys, always in ApiListingResource, the value of sc.getServletContext() is not null instead
Thu May 11 13:19:37 2017  ilgrosso:sberyozkin: the problem with @Context injection in ApiListingResource could it be related to the fact that we now have Swagger2ApiListingResource?
Thu May 11 13:20:52 2017  ilgrosso:if I replace
Thu May 11 13:20:53 2017  ilgrosso:ApiListingResource apiListingResource = new Swagger2ApiListingResource(customizer);
Thu May 11 13:20:55 2017  ilgrosso:with
Thu May 11 13:21:00 2017  ilgrosso:ApiListingResource apiListingResource = new ApiListingResource();
Thu May 11 13:21:04 2017  ilgrosso:everything works
Thu May 11 13:23:14 2017  ilgrosso:(with no customizer, of course)
Thu May 11 13:31:22 2017  ilgrosso:sberyozkin: with this change: https://paste.apache.org/iejd everything seems to work...
Thu May 11 13:49:23 2017  ilgrosso:sberyozkin: another thing is that if swagger2Serializers are not added to providers, the produced swagger.json is full of null values and does not work well with Swagger UI, as outlined in http://stackoverflow.com/questions/34045325/null-values-on-swagger-json-file
Thu May 11 13:51:23 2017  ilgrosso:sberyozkin: so these are my current modifications: https://paste.apache.org/Nz07
Thu May 11 13:51:23 2017  ilgrosso:with those, all is ok in Syncope, always with Swagger 1.5.12
Thu May 11 13:53:14 2017  sberyozkin:ilgrosso: but it should be added if customizer is set to null which is what is needed to work with 1.5.12 ?
Thu May 11 13:53:55 2017  ilgrosso:I now have customizer != null and swagger2Serializers !=null
Thu May 11 13:54:06 2017  ilgrosso:and with those changes, it works
Thu May 11 13:54:32 2017  sberyozkin:ilgrosso: you do not have to set the customizer directly on the feature
Thu May 11 13:54:45 2017  ilgrosso:if I don't do that, it does not work
Thu May 11 13:55:36 2017  sberyozkin:ilgrosso: why ? if you set it on the serializers and not on the feature ?
Thu May 11 13:56:03 2017  ilgrosso:sberyozkin: I found that this morninig, let me try without (don't recall exactly why...)
Thu May 11 13:56:48 2017  sberyozkin:ilgrosso: let me get back to you later on, we'll have a concall now
Thu May 11 14:00:23 2017  ilgrosso:sberyozkin: I confirm you were right :-)
Thu May 11 14:01:15 2017  ilgrosso:so now my only modification to CXF sources is https://paste.apache.org/iejd
Thu May 11 14:15:43 2017  ilgrosso:Joined the channel
Thu May 11 14:42:59 2017  sberyozkin:Joined the channel
Thu May 11 14:46:20 2017  sberyozkin:ilgrosso: hi Francesco, I'm fixing a bug that I introduced which was causing sc==null
Thu May 11 14:46:34 2017  ilgrosso:ah cool :-)
Thu May 11 14:47:46 2017  ilgrosso:sberyozkin: with 1.5.13 it seems that the customizer is not involved at all, and basePath is wrong (see my last comment on CXF-7316)
Thu May 11 14:51:44 2017  sberyozkin:ilgrosso: ok, the servlet context injection issue is now fixed; when you switch to 1.5.13 - do you set the customizer on the feature ?
Thu May 11 14:52:40 2017  sberyozkin:ilgrosso: I know you set it on the serializers but with 1.5.13 - serializers are not checked
Thu May 11 14:53:10 2017  ilgrosso:ah I see
Thu May 11 14:53:13 2017  ilgrosso:let me check...
Thu May 11 14:53:14 2017  sberyozkin:ilgrosso: once we update CXF to swagger 1.5.13 we will need to drop serialziers
Thu May 11 14:54:14 2017  sberyozkin:ilgrosso: that is why in 3.1.x it is these confusing (if customizer == null) etc to let people to continue working with 1.5.12 but try 1.5.13 if needed
Thu May 11 14:56:08 2017  sberyozkin:ilgrosso: by the way I said I recompiled 3.1.12-S with 3.1.11 specific code changes and could not see spring boot with you chnages without @api working but most likely I just messed up with something during that hacky experiment :-)
Thu May 11 14:56:28 2017  ilgrosso:sberyozkin: well, it happens :-)
Thu May 11 14:58:40 2017  sberyozkin:ilgrosso: so once you confirm you can get 1.5.13 working we can drop the serialziers from 3.2.0-SNAPSHOT and then decide if we update CXF 3.1.12 to 1.5.13 or may be wait till 3.1.13
Thu May 11 14:58:48 2017  ilgrosso:sberyozkin: sorry, can't confirm yet
Thu May 11 14:59:05 2017  sberyozkin:ilgrosso: sure, when you get a chance
Thu May 11 14:59:06 2017  ilgrosso:now I am only setting the customizer on the feature, no serializer
Thu May 11 14:59:18 2017  ilgrosso:but still basePath is / and no tags are found
Thu May 11 14:59:26 2017  ilgrosso:so it seems the customizer is not involved at all
Thu May 11 15:00:19 2017  ilgrosso:got to go now, I'll try to continue tomorrow..
Thu May 11 15:00:31 2017  sberyozkin:ilgrosso: I've just redeployed 3.1.12-snapshot with the injection fix - can you try that, with a breakpoint in the Swagger2ApiListingresource to check if the customizer is called
Thu May 11 15:00:40 2017  sberyozkin:ilgrosso: sounds good, talk to you tomorrow
Thu May 11 15:00:43 2017  ilgrosso:sberyozkin: do that tomorrow
Thu May 11 15:00:51 2017  ilgrosso:*I'll do that tomorrow
Thu May 11 15:01:20 2017  sberyozkin:ilgrosso: sounds good :-)
Thu May 11 15:41:10 2017  coheigea:Left the channel
Thu May 11 16:24:52 2017  syncope-bot:Joined the channel
Thu May 11 17:30:27 2017  syncope-bot:Joined the channel
Thu May 11 17:31:11 2017  syncope-bot:Joined the channel
Thu May 11 19:07:02 2017  jbonofre_:Joined the channel

Comments