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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Swagger service for the Odata API

rleir
17-Peridot

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

ACCEPTED SOLUTION

Accepted Solutions

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....

View solution in original post

3 REPLIES 3

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....

We have 11.0 M030 CPS18 but navidating to the URL https://<server>/Windchill/netmarkets/html/wrs/doc.html

I get the results below.

SB_7831082_0-1626874585566.png

 

With Rest services Help I am able to get the Swagger documentation

https://<server>/Windchill/netmarkets/jsp/restapi/index.html#!/Objects/findObjects

SB_7831082_1-1626874839295.png

 

Any reason why the ODATA swagger does not exist/ open?

 

rleir
17-Peridot
(To:SB_7831082)

I did not install CPS18 myself, but I did read the installation instructions and they seemed more complex than normal. And I do remember seeing the same {{domain.page}} display as you. Then I notified our admin and a short while later it was working correctly.

Announcements


Top Tags