cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
936
Views
15
Helpful
1
Replies

Swagger UI integration with NSO

equinix
Level 1
Level 1

Hello,

 

I'm trying to integrate Swagger UI with NSO as I've seen that it should be possible starting from NSO version 4.7.

I managed to generate a swagger specification using yanger, as explained in the NSO Northbound 4.7.4.1 PDF but when trying to run the requests via Swagger UI, the same error keeps popping up:

Server response

CodeDetails
Undocumented
TypeError: Origin http://127.0.0.1:8081 is not allowed by Access-Control-Allow-Origin.

 

Has anyone faced this issue before? 

 

Best regards,

Gabriel

1 Reply 1

lmanor
Cisco Employee
Cisco Employee

Hello Gabriel,

 

This is because of enforced CORS.

The workaround is to install appropriate browser add-on and enable it while working with the swagger- editor.

Chrome add-on: Allow-Control-Allow-Origin:*
Firefox add-on: CORS Everywhere
See also https://www.scribesoft.com/blog/2018/05/rest-connector-oas-swagger/.

 

-Larry