-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger UI - text cut off #30
Comments
Is it possible to take over whole page, or must we stay within iFrame of template? If so, a style or font change will suffice as long as the description column text is no longer cut off. |
I believe that the cut-off description occurs because of some very long content in the geocoder api descriptions that cannot wrap, so they expand the width of the table. This also causes two columns of the table to be pushed off the screen. Specifically, the problematic description in the geocoder spec is the following:
The coordinates of the bbox string get treated as a single word that does not wrap. This could be fixed with a modification to swagger-ui css. I will make the change to my fork of swagger-ui, and will try to get it pulled into the master repo. In the mean time I don't think we should use a non-stock version of swagger-ui within the CKAN openapi extension. Instead, while we wait for my css fix to be accepted, I suggest we continue to use the stock version of swagger-ui, and just modify the geocoder api spec to avoid the cut-off descriptions. If we do decide to resolve this by updating the geocoder API spec, note that the BCDC record in "cad" seems to be pointing to a swagger resource in Leo's repo. When testing with BCDC, why don't we use a geocoder api spec from the api-specs repository. I think that is our master copy of the spec, so how about we update it to resolve the word-wrap problem? Thoughts? |
I agree. Please proceed with a modification to your fork of the swagger UI css. For the time being, DataBC can also update the geocoder api spec located in the api-specs repository. I'm not sure why BCDC cad is pointing to a different repo for the JSON file? Unless there is a reason for this I suggest we have both cad and cat for BCDC point to the /bcgov/api-specs location. |
I have forked the api-spec (authored by mraross), applied the change and submitted a pull request. As soon as its accepted we can re-test. |
A new geocoder.json file has been merged in the master with coordinates adjusted as suggested above. QA also performed on Gated Geocoder and Route Planner api-specs |
I have created a patch for swagger-ui so it better handles long words in parameter descriptions (and other content that cannot wrap). My pull request to have the patch introduced back into the master repo is here. I have not modified any of DataBC's internal tools that utilize swagger-ui (such as the CKAN openapi console extension, or the BCDevX API console) to instead utilize my patched version. I'd prefer for us to use the stock version of swagger-ui if possible, so let's see if my PR gets accepted... |
@banders Can this fix be integrated into our new fork of the core Swagger UI code? |
Created an issue for this in the swagger-ui repo. The issue has a link to the pull request for my patch. |
@BK01 to review this week |
UAT complete in cat.data... |
The swagger-ui community has merged my pull request into the core. |
Ready to migrate to PROD. |
Custom change to OpenAPI extension (font size or column adjustment, style change) to resolve description text from being cut off. See cat.gov.bc.ca
The text was updated successfully, but these errors were encountered: