cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Swagger service for the Odata API

Amethyst

Swagger service for the Odata API

Hi all,

I know of the Swagger service at <server>/Windchill/netmarkets/jsp/restapi/ , and it works well to experiment with the REST API at <server>/Windchill/servlet/rest/structure/objects

 

Is there also an equivalent Swagger service for the Odata API at <server>/Windchill/servlet/odata/ ?

thanks

Rick

Tags (2)
1 REPLY 1

Re: Swagger service for the Odata API

There are ways to describe the OData API with a Swagger definition. In fact this is even used in the WRS documentation browser, where the documentation on domain service level is rendered with the Swagger doc pages.  If you pay close attention you will even see that tehre is a URL in WIndchill that converts the OData to a Swagger/OpenAPI v2 service description.

 

windchill.jpg

 

 

 

This resource link (https://<server>/Windchill/netmarkets/html/wrs/odata-to-swagger.jsp?v=2&d=CADDocumentMgmt can also be used separately and the result will be the Swagger service description of the corresponding OData Domain and version in JSON format.
The generated OIpenAPIv2 service description has minor issues:

  1. it uses operationIds which are not unique. According to the spec operationIds are optional so you can fix it by removing them altogether.
  2. it doesn't include the name attribute for requestBody input params. According to the spec these are required but will be ignored. You can fix it by adding any name e.g. 'body' in the generated json.

I hope this answer is not too late - I thought it would be good to know....

Announcements