Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add POST to [base]/[type]/_search to generated swagger/openapi #1845

Closed
lmsurpre opened this issue Jan 5, 2021 · 2 comments
Closed

Add POST to [base]/[type]/_search to generated swagger/openapi #1845

lmsurpre opened this issue Jan 5, 2021 · 2 comments
Assignees
Labels
cms-interop This issue is associated with the CMS interoperability rule openapi P2 Priority 2 - Should Have

Comments

@lmsurpre
Copy link
Member

lmsurpre commented Jan 5, 2021

Is your feature request related to a problem? Please describe.
https://www.hl7.org/fhir/search.html mentions that search can be invoked via a POST to [base]/[type]/_search.
Our FHIR server supports this, but this endpoint is not listed in our generated swagger / openapi definitions.

Describe the solution you'd like
Generated swagger / openapi definition should include this endpoint

Additional context
This endpoint is missing from the swagger that is generated for the various IGs as well. I brought it up at https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Search.20via.20POST

Suggestion for how to perform QA

  1. For swagger: Go to https://editor.swagger.io/ and copy/paste generated swagger and verify it looks correct.
  2. For openapi: Start up fhir-openapi server, (e.g. https://localhost:9443/openapi/ui/) and verify it looks correct.
@lmsurpre lmsurpre added the cms-interop This issue is associated with the CMS interoperability rule label Jan 22, 2021
@lmsurpre lmsurpre added the P2 Priority 2 - Should Have label Feb 22, 2021
@tbieste tbieste self-assigned this Mar 24, 2021
@tbieste tbieste added this to the Sprint 2021-04 milestone Mar 24, 2021
tbieste added a commit that referenced this issue Mar 24, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Mar 24, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
lmsurpre added a commit that referenced this issue Mar 25, 2021
Issue #1845 - Add POST _search to generated swagger/openapi
@lmsurpre
Copy link
Member Author

lmsurpre commented Apr 9, 2021

I navigated to https://localhost:9443/openapi/ui and confirmed that each resource endpoint now has an entry for POST to [base]/[type]/_search.

Additionally, with #1846, each resource also has a _search endpoint for each compartment they belong to.

I was able to invoke the POST from the Swagger UI and it seemed to work. However, when I try to add a body the tool seems to put each character of my body into its own form param:
image

@lmsurpre
Copy link
Member Author

lmsurpre commented Apr 9, 2021

from Troy:

In newer releases of swagger-ui, there’s a checkbox to choose whether empty parameters are passed to the REST call. But I have no idea which version of the openapi ui liberty is using, or how to change it. That was a mystery to me.

I think its acceptable.

@lmsurpre lmsurpre closed this as completed Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cms-interop This issue is associated with the CMS interoperability rule openapi P2 Priority 2 - Should Have
Projects
None yet
Development

No branches or pull requests

2 participants