arc-archive / api-navigation

⛔️ DEPRECATED This component is being deprecated. Use `@api-components/amf-components` instead.
0 stars 1 forks source link

fix: APIC-435 use title as label for documentation items #11

Closed carowright closed 4 years ago

carowright commented 4 years ago

bug: Listing descriptions of documentation items when it should list their titles fix: Use title as label for documentation items

carowright commented 4 years ago

Hi @jarrodek, thanks for your review. This fix is intended for when you have defined both title and description for docs. As an example,

externalDocs:
  url: http://
  description: |
    Welcome to the _Test API_ Documentation. The _Test API_
    allows you to test console and mocking service features
    [integration libraries](https://mulesoft.com)
  x-amf-title: Test Console and Mocking Service

I included a change, now it takes into account both title and description. When title is defined it will be set as label, and if not it will use description.

jarrodek commented 4 years ago

Thanks @carowright for the explanation. The description field seems to be a secondary option here. It should be used only when title is not detected. The initial approach messes up with existing implementations and support for the external links. What is this x-amf-title thing in the API spec?

jarrodek commented 4 years ago

Also, may I ask you to kindly put the new API to the demo page (demo/lib/common.js) so the API can be inspected visually? I encourage you to always check the demo page before submitting a PR as tests may not always catch all issues.