[SwaggerProxy] Swagger import failing

Forge Component
(4)
Published on 2017-06-15 by Leonardo Fernandes
4 votes
Published on 2017-06-15 by Leonardo Fernandes

Hi All,


I'm trying to find a way to import a webservicewith what looks like it is a correct swagger definition. I generated the attached swagger file from the webservice (swagger inspector) and used it in SwaggerProxy to generate a correct url i can import. After fooling around a bit with other problems (URL not found issues) i finally reached the point where i should be able to import it. I know this because a massively scaled down version (just picked on of the simpeler methods in the file and used only that and the corresponding definition) did import....  However, when using the whole thing it does not. I've been looking at multiple posts to see what part of the file is not supported, but can't seem to find the culprit. 


Anyone here who dare to take a shot? We are using OS Server Version 10.0.900.0... 

The issues / things i found/tried/looked at:

Thanks in advance,


Alexander


PS. Sorry for the ZIP, it would not take the json file

Solution

Hi Alexander,

I've had this same behaviour ones and I ended up opening a support case with OutSystems. This is what they came up with:

We were able to replicate the same behavior while consuming the REST API on Service Studio.
The issue occurs because the JSON file contains a pattern that is not supported in OutSystems 10. The ********** type contains an example, and Service Studio is not able to handle it.

As an alternative, we've tested removing the example and we were able to import the JSON file (please check the attached file, swagger-without-example.json).

We noticed that this information is not available in our public documentation, and for that reason, we will share this feedback with our internal teams to update this information.

Just as a side note, this pattern is supported in OutSystems 11, in that way if you try to import it using that version you will be able to consume the REST service.

Your swagger JSON contains a lot of 'examples' and since you are also on OutSystems 10, this seems to be the same issue. 

Remove all examples from the swagger JSON and Service Studio should be able to consume the REST API afterwards.

Regards,

Nordin

Solution

Nordin Ahdi wrote:

Hi Alexander,

I've had this same behaviour ones and I ended up opening a support case with OutSystems. This is what they came up with:

We were able to replicate the same behavior while consuming the REST API on Service Studio.
The issue occurs because the JSON file contains a pattern that is not supported in OutSystems 10. The ********** type contains an example, and Service Studio is not able to handle it.

As an alternative, we've tested removing the example and we were able to import the JSON file (please check the attached file, swagger-without-example.json).

We noticed that this information is not available in our public documentation, and for that reason, we will share this feedback with our internal teams to update this information.

Just as a side note, this pattern is supported in OutSystems 11, in that way if you try to import it using that version you will be able to consume the REST service.

Your swagger JSON contains a lot of 'examples' and since you are also on OutSystems 10, this seems to be the same issue. 

Remove all examples from the swagger JSON and Service Studio should be able to consume the REST API afterwards.

Regards,

Nordin

Thanks a lot!!! worked like a charm for me...


Kind regards,

Alexander


Glad it worked :)