FHIR Chat · FHIR.Net Swagger/OpenAPI Support · dotnet

Stream: dotnet

Topic: FHIR.Net Swagger/OpenAPI Support


view this post on Zulip Johan Botha (Aug 20 2020 at 14:44):

Is there a way to expose for example a Patient resource in a controller so that it will generate the appropriate swagger/openapi structure in SwashBuckle? Currently it everything with an element renders as a complex schema entry:

{
"entry": {
"identifier": [
{
"useElement": {
"value": "Usual",
"elementId": "string",
"extension": [
{
"url": "string",
"elementId": "string",
"extension": [
null
]
}
]
},
"type": {
"coding": [
{
"systemElement": {
"value": "string",
"elementId": "string",
"extension": [
{
"url": "string",
"elementId": "string",
"extension": [
null
]
}
]
},

view this post on Zulip Michele Mottini (Aug 20 2020 at 14:49):

Swagger / OpenAPI is a very poor fit for FHIR. Better to point people to the FHIR specs

view this post on Zulip Gino Canessa (Aug 20 2020 at 15:09):

The fhir-codegen project I've been working on currently has EXPERIMENTAL support for generating OpenAPI specs (v2 or v3). There are quite a few language options to control the process (e.g., use schemas or inline definitions, types of operations to include, case of operation ids, etc.).

I've run through testing on a few configurations and platforms, but there's still plenty of work to be done. Happy for feedback if you feel like tinkering with it.

view this post on Zulip Gino Canessa (Aug 20 2020 at 15:28):

Michele Mottini said:

Swagger / OpenAPI is a very poor fit for FHIR. Better to point people to the FHIR specs

I have found there are a lot of workflows/tools that depend on OpenAPI (e.g., cloud connectors, security layers, etc.). In those cases, it is not a matter of documentation for the server, but of integration into existing platforms.

view this post on Zulip Brian Postlethwaite (Aug 24 2020 at 06:06):

The IG Builder does produce OpenAPI output, the issue with it is that tools barf on the size of it, the self referencing and extensibility, oh and XML/JSON support - though I expect that tools don't know what to do when they see the xsd definitions also in there.
The tools that handle OpenAPI don't like the extensibility capabilities - I expect they are more expecting a simpler static type system defined.


Last updated: Apr 12 2022 at 19:14 UTC