Re: Swagger2feature / 3.1.12 (DOSGI)

2017-10-11 Thread nino martinez wael
No problem, I tried both configurations but no matter what I do, the host
remains the same 0.0.0.0:9090

On 11 Oct 2017 15:51, "Sergey Beryozkin"  wrote:

Sorry, I accidentally moved it from the users list,


On 11/10/17 14:42, nino martinez wael wrote:

> Sure, in my example you can see that host 0.0.0.0:9090 <
> http://0.0.0.0:9090> have been generated.. However calling
>
> http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns <
> http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns>
>
>
>
> Will never work.. It has to be an IP or dns name.. 0.0.0.0 is not valid..
>

CXF Swagger2Feature is definitely not involved into generating a host
value, but it has a 'host' property which if set is passed to Swagger.

May be alternative option is to set a 'usePathBasedConfig' property - I
think this may actually work better

HTH, SErgey


>
> On Wed, Oct 11, 2017 at 3:19 PM, Sergey Beryozkin  > wrote:
>
> Can you please explain what is wrong with the returned fragment ?
>
> Sergey
>
> On 11/10/17 14:12, nino martinez wael wrote:
>
> Im not sure if I have explained myself correctly.. The problem
> is this:
>
> http://localhost:9090/tdc/dialer/webservices/v1/swagger.json#/
> 
>
> {
> "swagger" : "2.0",
> "info" : {
>   "description" : "Osgi Dialer Webservice",
>   "version" : "1.26.0.SNAPSHOT",
>   "title" : "Osgi Dialer Webservice",
>   "contact" : {
> "name" : "developm...@tdcnetdesign.dk
> "
>
>   },
>   "license" : {
> "name" : "Commercial",
> "url" : "http://www.apache.org/licenses/LICENSE-2.0.html
> "
>   }
> },  "host" : "0.0.0.0:9090 ",
>
> "basePath" : "/tdc/dialer/webservices/v1",
> "tags" : [ {
>   "name" : "api-docs"
> }
>
>
> Swagger UI then generates requests like this:
>
> http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns
> 
>
>
> Which obviously fails.. How can I change this behaviour?
>
>
> On Tue, Oct 10, 2017 at 3:31 PM, nino martinez wael <
> nino.martinez.w...@gmail.com
> > wrote:
>
> Hi
>
> I am running a dedicated CXF JAX RS on 0.0.0.0:9090
> 
>
>
> the issue are that my swagger.json states that the host are
> 0.0.0.0:9090 
>
>
> I've tried to overwrite it using:
>
> Swagger2Feature swagger = new Swagger2Feature();
> swagger.setHost("127.0.0.1:9000 ");
>
>
> But swagger.json remains unchanged. What am I missing?
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>
>
>
>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>


FIQL: escape comma

2017-10-11 Thread Francesco Chicchiriccò

How to correctly escape the following FIQL expression?

ctype==ou=sample,o=isp

?

I have set the jaxrs:properties

  
  
  

but the request URL

 http://localhost:9080/syncope/rest/users?fiql=ctype%3D%3Dou%3Dsample,o%3Disp

fails with

17:47:19.129 ERROR 
org.apache.syncope.core.rest.cxf.service.AbstractServiceImpl - Invalid 
FIQL expression: ctype==ou=sample,o=isp
org.apache.cxf.jaxrs.ext.search.SearchParseException: Not a comparison 
expression: o=isp
    at 
org.apache.syncope.common.lib.search.SyncopeFiqlParser.parseComparison(SyncopeFiqlParser.java:90) 
~[syncope-common-lib-2.0.7-SNAPSHOT.jar:2.0.7-SNAPSHOT]
    at 
org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser.parseAndsOrsBrackets(FiqlParser.java:230) 
~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]
    at 
org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser.parse(FiqlParser.java:167) 
~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]
    at 
org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:101) 
~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]
    at 
org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:82) 
~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]
    at 
org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:76) 
~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]


As you can see from the stacktrace, I am using my own parser [1].

TIA
Regards.


[1] 
https://github.com/apache/syncope/blob/2_0_X/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeFiqlParser.java


--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/



Re: Swagger2feature / 3.1.12 (DOSGI)

2017-10-11 Thread Sergey Beryozkin

Sorry, I accidentally moved it from the users list,


On 11/10/17 14:42, nino martinez wael wrote:
Sure, in my example you can see that host 0.0.0.0:9090 
 have been generated.. However calling


http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns 




Will never work.. It has to be an IP or dns name.. 0.0.0.0 is not valid..


CXF Swagger2Feature is definitely not involved into generating a host 
value, but it has a 'host' property which if set is passed to Swagger.


May be alternative option is to set a 'usePathBasedConfig' property - I 
think this may actually work better


HTH, SErgey




On Wed, Oct 11, 2017 at 3:19 PM, Sergey Beryozkin > wrote:


Can you please explain what is wrong with the returned fragment ?

Sergey

On 11/10/17 14:12, nino martinez wael wrote:

Im not sure if I have explained myself correctly.. The problem
is this:

http://localhost:9090/tdc/dialer/webservices/v1/swagger.json#/


{
    "swagger" : "2.0",
    "info" : {
      "description" : "Osgi Dialer Webservice",
      "version" : "1.26.0.SNAPSHOT",
      "title" : "Osgi Dialer Webservice",
      "contact" : {
        "name" : "developm...@tdcnetdesign.dk
"
      },
      "license" : {
        "name" : "Commercial",
        "url" : "http://www.apache.org/licenses/LICENSE-2.0.html
"
      }
    },  "host" : "0.0.0.0:9090 ",
    "basePath" : "/tdc/dialer/webservices/v1",
    "tags" : [ {
      "name" : "api-docs"
    }


Swagger UI then generates requests like this:

http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns



Which obviously fails.. How can I change this behaviour?


On Tue, Oct 10, 2017 at 3:31 PM, nino martinez wael <
nino.martinez.w...@gmail.com
> wrote:

Hi

I am running a dedicated CXF JAX RS on 0.0.0.0:9090


the issue are that my swagger.json states that the host are
0.0.0.0:9090 

I've tried to overwrite it using:

Swagger2Feature swagger = new Swagger2Feature();
swagger.setHost("127.0.0.1:9000 ");

But swagger.json remains unchanged. What am I missing?


--
Best regards / Med venlig hilsen
Nino Martinez







--
Best regards / Med venlig hilsen
Nino Martinez


Re: Swagger2feature / 3.1.12 (DOSGI)

2017-10-11 Thread nino martinez wael
Im not sure if I have explained myself correctly.. The problem is this:

http://localhost:9090/tdc/dialer/webservices/v1/swagger.json#/

{
  "swagger" : "2.0",
  "info" : {
"description" : "Osgi Dialer Webservice",
"version" : "1.26.0.SNAPSHOT",
"title" : "Osgi Dialer Webservice",
"contact" : {
  "name" : "developm...@tdcnetdesign.dk"
},
"license" : {
  "name" : "Commercial",
  "url" : "http://www.apache.org/licenses/LICENSE-2.0.html";
}
  },  "host" : "0.0.0.0:9090",
  "basePath" : "/tdc/dialer/webservices/v1",
  "tags" : [ {
"name" : "api-docs"
  }


Swagger UI then generates requests like this:

http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns


Which obviously fails.. How can I change this behaviour?


On Tue, Oct 10, 2017 at 3:31 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Hi
>
> I am running a dedicated CXF JAX RS on 0.0.0.0:9090
>
> the issue are that my swagger.json states that the host are 0.0.0.0:9090
>
> I've tried to overwrite it using:
>
> Swagger2Feature swagger = new Swagger2Feature();
> swagger.setHost("127.0.0.1:9000");
>
> But swagger.json remains unchanged. What am I missing?
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez