stoplightio / elements

Build beautiful, interactive API Docs with embeddable React or Web Components, powered by OpenAPI and Markdown.
https://stoplight.io/open-source/elements/
Apache License 2.0
1.6k stars 189 forks source link

fix: remove the postfix License after the license name in AdditionalInfo #2573

Open weyert opened 2 months ago

weyert commented 2 months ago

Elements Default PR Template

In general, make sure you have: (check the boxes to acknowledge you've followed this template)

This pull request changes the way the license name gets rendered in HttpService and should fix #2523

netlify[bot] commented 2 months ago

Deploy Preview for stoplight-elements ready!

Name Link
Latest commit e5548a27ef88d462ca1ffa458cad0c6802c9bc9e
Latest deploy log https://app.netlify.com/sites/stoplight-elements/deploys/662a5e254951f50008269273
Deploy Preview https://deploy-preview-2573--stoplight-elements.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 2 months ago

Deploy Preview for stoplight-elements-demo ready!

Name Link
Latest commit e5548a27ef88d462ca1ffa458cad0c6802c9bc9e
Latest deploy log https://app.netlify.com/sites/stoplight-elements-demo/deploys/662a5e258623cd0008553ec7
Deploy Preview https://deploy-preview-2573--stoplight-elements-demo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

kentbulza commented 2 months ago

I don't know the team philosophy when the data doesn't match the OpenAPI spec. You could not display at all if the strict terms "mutually exclusive" aren't followed ( https://spec.openapis.org/oas/v3.1.0#license-object ) ; or you could error. Probably should follow whatever's your convention.

There's not a test case for "name" alone. Only name is required and if name alone is there, then it seems to me it it should be just the name text. You don't want to get "undefined" as the link.

weyert commented 2 months ago

@kentbulza Thanks, I have updated it

brendarearden commented 2 months ago

We do like this approach for fixing the postfix, but our team needs to do additional testing prior to merging this in.