bcgov / DBC-APIM

DataBC OPEN API Services
Apache License 2.0
1 stars 0 forks source link

Upgrade swagger-editor #57

Open BK01 opened 6 years ago

BK01 commented 6 years ago
  1. Upgrade the swagger editor to the latest release to ensure compatibility with the new OpenAPI 3.x specs.
  2. Change the default sample. Investigate adding an init parameter to index.html (spec={})

We first need to first upgrade swagger-ui and complete UAT before updating swagger editor.

BK01 commented 6 years ago
  1. New specs
  2. Update swagger-ui and swagger-editor (new header) at the same time.
banders commented 6 years ago

Header should be customized to match:

https://bcgov.github.io/mygovbc-bootstrap-theme/docs/index.html

BK01 commented 6 years ago

DataBC to confirm location of swagger editor code.

BK01 commented 6 years ago

Investigate use of launcher page for swagger editor with BC Gov't header/footer but use core code for latest community version.

banders commented 6 years ago

@BK01 Can you confirm the location for storing the swagger editor code? I am unable to access the location identified in this issue.

BK01 commented 6 years ago

@banders Please also use the BC Gov't favicon as completed for #71

banders commented 6 years ago

@BK01 The new swagger-editor has been committed here:

https://gogs.data.gov.bc.ca/apim/oas-editor

@ll911 Can you deploy this to a web accessible location?

Example usage:

[deployment url]?url=https://raw.githubusercontent.com/banders/api-specs/upgrade-to-openapi3/geocoder/geocoder-combined.json

ll911 commented 6 years ago

https://oas-editor-t.apps.gov.bc.ca/

BK01 commented 6 years ago

@banders to add generate client and generate server menus.

banders commented 6 years ago

@BK01 Our deployment of swagger-editor is configured to display all the menus, but swagger-editor is buggy and doesn't always display them. Try refreshing the page a few times, and you'll probably notice the menus will come back.

We should file a bug report with the swagger editor community.

BK01 commented 6 years ago

Thanks for the confirmation. During my tests the two menu's appear on screen for a moment and then disappear.

banders commented 6 years ago

@BK01 Sean reported to the swagger-ui community the problem with "generate client" and "generate server" buttons not displaying.

https://github.com/swagger-api/swagger-editor/issues/1625

Looks like this is a known issue related to the following:

https://github.com/swagger-api/swagger-editor/pull/1592

In summary, MS Edge has a bug that prevents display of the "generate" menus. The bug has been reported to Microsoft. All other browsers use a delayed loading of the menus.

BK01 commented 6 years ago

@banders @ll911 Scheduled for migration to PROD. Future patch can address the MS Edge issue.

BK01 commented 6 years ago

@banders @ll911 New OAS Editor in PROD. Links in BCDC metadata records have all been updated with the exception of WorkBC which will be re-tested after the Jan 12th patch is implemented.

BK01 commented 6 years ago

Migration to PROD complete