Author |
Message
|
wmbfrz |
Posted: Thu Oct 06, 2016 7:26 am Post subject: REST API Project upward compatibility |
|
|
Apprentice
Joined: 08 Jan 2010 Posts: 28
|
Hello All
We had developed a REST API project in IIB 10.0.0.3 and it was working fine. I downloaded IIB 10.0.0.5 and imported the project but it shows error. The error details on Problem tab are as follows
Description: An error happened while loading the REST API.
Location: Unknown
Type: REST API Problem.
Is this a case for PMR or some configuration issue? |
|
Back to top |
|
 |
martinb |
Posted: Fri Oct 07, 2016 1:33 am Post subject: |
|
|
Master
Joined: 09 Nov 2006 Posts: 210 Location: UK
|
Hi
Couple of things to check
- Ensure all the files imported OK, select the REST API project and right click and run a "Refresh". Then run a "clean", from the Project menu
If the error is still there, it's worth looking in the IB Toolkit Eclipse log to see if more detailed error cause is logged. (Menu Window -> Show view -> Other -> Error log).
Since you create the REST API in 10.0.0.3 I assume it's using a Swagger document you imported, (Create REST API from scratch was added in 10.0.0.4), so I guess it's possible that there is some additional validation of the Swagger .json file in 10.0.0.5, however the IB Toolkit should be reporting why it can't load. So unless the steps above sort this it is likely a issue to raise with IBM support I think. |
|
Back to top |
|
 |
timber |
Posted: Fri Oct 07, 2016 2:28 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
the IB Toolkit should be reporting why it can't load |
True. In 10.0.0.3 it won't do that. It just refuses to load the OpenAPI with a generic error message.
I think it's quite likely that the validation has been tightened up in 10.0.0.5. I recommend that you load the OpenAPI spec into some other tool and check the errors/warnings. |
|
Back to top |
|
 |
vishBroker |
Posted: Mon Oct 10, 2016 10:57 am Post subject: |
|
|
Centurion
Joined: 08 Dec 2010 Posts: 135
|
I do not think, PMR is the way..not at least right away.
We have used RESTAPI from 10.0.0.3 to 10.0.0.5 and it worked fine.
You may want to look at the swagger file that got created in 10.0.0.3.
Use that swagger file to create RESTAPI in 10.0.0.5.
YOu can also want to validate the swagger file. |
|
Back to top |
|
 |
leron8 |
Posted: Tue Oct 25, 2016 2:51 pm Post subject: Check Swagger File |
|
|
 Novice
Joined: 25 Oct 2016 Posts: 20 Location: MX
|
As some people added before, you should check your swagger file, I was in the same situation and the problem was that I had invalid data types according to the swagger specification.
You can go here:
http://editor.swagger.io/#/
File, Paste JSON and it will validate ir for you and tell you what problems you have. |
|
Back to top |
|
 |
|