kuzzleio / kuzzle

Open-source Back-end, self-hostable & ready to use - Real-time, storage, advanced search - Web, Apps, Mobile, IoT -
https://kuzzle.io
Apache License 2.0
1.43k stars 123 forks source link

Kuzzle does not support Swagger UI to test API routes #2289

Closed Aschen closed 1 year ago

Aschen commented 2 years ago

Description

Go to https://petstore.swagger.io/ and paste http://<kuzzle>:<port>/_openApi

Try to test a POST method

Swagger UI is sending a OPTIONS HTTP request and Kuzzle does not support this verb

ChillPC commented 2 years ago

I didn't understand. Swagger UI indeed send an OPTIONS before all PUT and POST request (relevant issue of Swagger UI). But Kuzzle answer 200 OK to all OPTIONS request.

Tested with /{index}/{collection}/_count (and others).

image

Raw response:

{
  "action": null,
  "controller": null,
  "error": null,
  "node": "knode-funny-koala-31388",
  "requestId": "57c8b218-71a3-44b8-b786-3ffe4eeff09a",
  "result": {},
  "status": 200,
  "volatile": null
}
ChillPC commented 2 years ago

Go to https://petstore.swagger.io/ and paste http://<kuzzle>:<port>/_openApi

To be sure, it is http://<kuzzle>:<port>/_openapi

Aschen commented 2 years ago

Hmm really strange, I just tried with Chrome and I still have issues image

alexandrebouthinon commented 1 year ago

Working properly on my side. I use Firefox 105.0.2 and a local Kuzzle stack

https://user-images.githubusercontent.com/7868838/195104723-cf682811-a087-4d1c-8312-a348aa8f0cf2.mov

ChillPC commented 1 year ago

Since it is old and blocked, I close it