Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Development (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=8)
-   -   REST Endpoints client library (http://www.mirthcorp.com/community/forums/showthread.php?t=216126)

pcristini 06-14-2016 11:23 AM

REST Endpoints client library
I'm trying to generate client classes to access the REST endpoints exposed in 3.4 however all the swagger related generators cannot parse the swagger.json file properly.

I've tried Visual Studio's built in AutoREST as well as http://editor.swagger.io/

Here's the error from AutoREST

[Info]AutoRest Core
[Info]Initializing code generator.
[Info]Successfully initialized CSharp Code Generator 1.0.5584.22489
[Info]Initializing modeler.
[Info]Successfully initialized Swagger Modeler 1.0.5584.22490
[Info]Parsing swagger json file.
[Fatal]Error parsing swagger file. Error converting value "ref" to type 'System.Nullable`1[Microsoft.Rest.Modeler.Swagger.Model.SwaggerDataType]'. Path 'type', line 6, position 16.
Exception: There was an error during code generation when trying to add a client for the REST API
Generating client code and adding to project failed

narupley 06-14-2016 12:47 PM

Not sure, it works just fine with Swagger UI, and with Jersey / JAX-RS.

All times are GMT -8. The time now is 12:42 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation