Repository navigation
fix: show additional info panel when contact has url but no email - #3006
Open
SB-virendrasolanke wants to merge 2 commits into
Open
SB-virendrasolanke wants to merge 2 commits into
SB-virendrasolanke wants to merge 2 commits into
Conversation
SB-virendrasolanke
requested review from
bgriffn,
bhaskarsontakke and
pareshb3089
October 28, 2026 11:39
✅ Deploy Preview for stoplight-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for stoplight-elements-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
pareshb3089
reviewed
Oct 28, 2026
| <Box data-test="additional-info"> | ||
| {(data.contact?.email || data.license || data.termsOfService) && ( | ||
| {(data.contact?.email || data.contact?.url || data.license || data.termsOfService) && ( | ||
| <AdditionalInfo |
There was a problem hiding this comment.
In AdditionalInfo component also changes will be required ?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
STOP-6698
API contact information was not displayed in the UI when the OpenAPI specification provided a contact
name/urlwithout anemailaddress. Per the OpenAPI Contact Object definition,emailis optional, so a contact with onlyname/urlis valid and should still be rendered.Description
In
HttpService.tsx, the "Additional Information" panel (AdditionalInfo) was gated by a condition that only checkeddata.contact?.email:If a contact had only
name+url(noemail), this condition evaluated tofalseand the panel never rendered, even thoughAdditionalInfoitself already knows how to build a[Contact <name>](<url>)link fromname+urlalone.Updated the condition to also check
data.contact?.url, so the panel renders whenever eitheremailorurlis present:No changes were needed inside
AdditionalInfo.tsx— its existing logic already prioritizesname+urloveremailwhen both exist, and falls back gracefully (returnsnull) if no contact/license/ToS data is available.How Has This Been Tested?
contact.name+contact.url(noemail) now renders the "Additional Information" panel with a[Contact <name>](<url>)link.emailonly,license, andtermsOfService.contact,license, ortermsOfServiceare present.Screenshot(s)/recordings(s)
Before adding URL condition -

After Adding URL OR condition -

Types of changes
Checklist
s/needs-docslabel.