Horreum
Horreum copied to clipboard
OpenAPI spec does not giver clear example of POST endpoint with query params
for example:
https://horreum.hyperfoil.io/openapi/#tag/Run/operation/addRunFromData
Gives an example of POST /api/run/data
instead of ;
POST /api/run/data?test=my-test&schema=...
@johnaohara this website url shows a blank page in a browser. Is this issue still relevant ?
@whitingjr yes, this is still an issue @stalep asked me about it yesterday, but we have not updated this issue.
this website url shows a blank page in a browser.
Which browser are you using? are there any errors logged in the console?
We need to get redocly to generate Requests samples for POST endpoints that accept query params: https://redocly.com/docs/openapi-visual-reference/parameter/#query-parameter
atm, we do not know how to annotate the rest endpoint with the smallrye-openapi annotations to achieve this
@whitingjr yes, this is still an issue @stalep asked me about it yesterday, but we have not updated this issue.
this website url shows a blank page in a browser.
Which browser are you using? are there any errors logged in the console?
FF122. There is a message in the console.
Uncaught ReferenceError: jQuery is not defined
On FF122, i see the same error in the console (which we should fix), but the screen renders
My browser is working after enabling a blocked domain. Back to the question. Is there some mechanism for the example to have additional parameters via the openapi config ?
I would assume so, because the redocly guide shows it: https://redocly.com/docs/openapi-visual-reference/parameter/#query-parameter
How that yaml is generated by the smallrey-openapi generator? I don't know
Are you seeking this ability to do curl requests which is in the page you linked too ?
Something like that yes.
right now, in the tutorials we show how to callt eh endpoint with curl : https://horreum.hyperfoil.io/docs/tutorials/create-test-run/, i.e.;
curl 'http://localhost:8080/api/run/data?test='$TEST'&start='$START'&stop='$STOP'&owner='$OWNER'&access='$ACCESS \ -s -H 'content-type: application/json' -H 'Authorization: Bearer '$TOKEN \ -d @/tmp/run.json
But the openapi spec is not providing the relevant examples, and it should
I think that's only available when using the Developer Portal.
As we are using Redoc (community) it has missing features provided by the open-core Redocly.
I reviewed alternative projects. None are providing both
- static site content
- ability to show example query parameters along with the API request
@johnaohara given the above situation is impractical with current features are you ok with closing this issue ?