stoplightio / elements

Build beautiful, interactive API Docs with embeddable React or Web Components, powered by OpenAPI and Markdown.

Home Page:https://stoplight.io/open-source/elements/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$.info.license.name Always Add Word "License"

kentbulza opened this issue · comments

Elements adds the word "License" to the end of the string contained in $.info.license.name. This make the assumption that every license is an Apache or MIT or something that would always be followed by the word "License", but it may be that the API uses another convention.

Context

Would like full control over the License string.

Current Behavior

Appends the word "License"

Possible Solution(s)

Simply remove the word "License". If someone wants to append the word "License", they can do so themselves.

This ticket has been labeled jira. A tracking ticket in Stoplight's Jira (STOP-226) has been created.

I want to add some more comment to this. The text actually transforms into a URL to SPDX. This would be the correct behavior for the identifier, which indeed is a SPDX license, but it should not be the behavior for name.

@kentbulza Can you clarify what you are expecting? Some examples of what you expect to happen on the two scenarios identifier and name given then I will see if I solve it for you. Got some time from work to work on Elements issues we have ourselves

Don't think we need to query the full name of the SPDX identifier license, right? Just the SPDX identifier itself?

Ah that's true. I keep thinking identifier relates to name but it's identifier and/or url :)

@kentbulza Raised a PR, let me know if this is what you imagined