Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Ways to implement _search (POST) in the HAPI FHIR

11 views
Skip to first unread message

Sushma Deshu

unread,
May 5, 2025, 1:27:04 PMMay 5
to HAPI FHIR
How to implement a _search operation in POST. Currently it shows me as a GET request. I would like to update it to POST.
Tried @Operation to implement custom search but still my swagger page shows as GET.

Could someone please help me.

James Agnew

unread,
May 5, 2025, 1:29:08 PMMay 5
to Sushma Deshu, HAPI FHIR
FWIW: The automatically generated swagger/OpenAPI documentation only shows it with the GET syntax, but the server will still support the POST syntax you are talking about - I guess this is a bug in the OpenAPI generator, but your server will absolutely support the POST syntax if it's supporting the GET syntax.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hapi-fhir/d0c09ace-a514-4736-be3b-49168cc86fe7n%40googlegroups.com.

Sushma Deshu

unread,
May 5, 2025, 2:17:21 PMMay 5
to HAPI FHIR
Can we customize openAPI to update it to POST?

James Agnew

unread,
May 5, 2025, 2:36:49 PMMay 5
to Sushma Deshu, HAPI FHIR
The class that generates the OpenAPI response is called OpenAPIInterceptor. A pull request would be welcomed, or you could subclass it.

Cheers,
James

Reply all
Reply to author
Forward
0 new messages