[ 
https://issues.apache.org/jira/browse/NIFI-15196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18037912#comment-18037912
 ] 

Matt Gilman commented on NIFI-15196:
------------------------------------

We could consider introducing some fall back logic to attempt to match a 
compatible viewer. However, I worry about burying that logic someplace and how 
maintainable it would be long term. This issue is really the 
"interface/contract" between an data viewer (which is a "UI Extension") and the 
framework. The data viewer advertises what content types it supports through 
the `nifi-content-viewer` file which is processed to discover supported content 
types and works similar to how other extension types are discovered through 
Java SPI. There currently is no way for NiFi to give a data viewer a candidate 
content type and ask it whether it's supported. The contract is string 
comparison with the contents of the `nifi-content-viewer` file. I will need to 
think about this more.

> Content viewer should default to JSON when content's mime type is 
> `application/fhir+json`
> -----------------------------------------------------------------------------------------
>
>                 Key: NIFI-15196
>                 URL: https://issues.apache.org/jira/browse/NIFI-15196
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 2.5.0
>         Environment: NiFi Version: 2.5.0
> Tag: rel/nifi-2.5.0
> Java Version: 21.0.3
> OS: Windows Server 2022
> Architecture: amd64
>            Reporter: Mark Ward
>            Priority: Minor
>
> When viewing JSON formatted content from a [link FHIR 
> |https://www.hl7.org/fhir/overview.html] compliant endpoint via InvokeHttp, 
> the returned content's MIME type is `application/fhir+json` and when viewed 
> in the Content Viewer this defaults to the *Hex* view. 
> It would save a few mouse-clicks of this kind of document defaulted to JSON 
> when viewed in the content viwer?
> IANA also supports a Mime type of `application/fhir+xml`, suggest this should 
> default to XML in the content viewer also.
> Additional Resources: 
>  * [Overview - FHIR v5.0.0|https://www.hl7.org/fhir/overview.html]
>  * [Fast Healthcare Interoperability Resources - 
> Wikipedia|https://en.wikipedia.org/wiki/Fast_Healthcare_Interoperability_Resources]
>  * 
> [iana.org/assignments/media-types/application/fhir+json|https://www.iana.org/assignments/media-types/application/fhir+json]
>  * 
> [iana.org/assignments/media-types/application/fhir+xml|https://www.iana.org/assignments/media-types/application/fhir+xml]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to