DummyJSON icon indicating copy to clipboard operation
DummyJSON copied to clipboard

OpenApi json file support

Open mehdihadeli opened this issue 1 year ago • 4 comments

Hi, Thanks for this useful apis. Is it possible to add openapi like swagger to this app? For example, a swagger.json file. We could use this swagger.json file for generating different clients

mehdihadeli avatar Jun 30 '23 14:06 mehdihadeli

Yep, I was looking for that. Bump this.

SrGeneroso avatar Oct 19 '23 19:10 SrGeneroso

Hi, I made an experiment with swagger-jsdoc and swagger-ui-express. Fork available here

I only did it for the products API (and without descriptions, examples, ...)

The Open API json file is available at '/api-docs/swagger.json' and the Swagger UI at '/api-docs'.

This could be a solution, surely not the only one. Embed Swagger UI is not necessary if you only want the json file, but it could replace a large part of the docs files.

Best Regards

json file swagger.json

screenshots swagger-products swagger-products-get

c4rth avatar Oct 31 '23 11:10 c4rth

Thank you @c4rth for this, I (or someone else) can use this as a starting point to implement this feature, I'm trying to make up some time to start working on this.

Ovi avatar Nov 01 '23 13:11 Ovi

Hi, would you consider adding a 'feature/openapi' branch for this feature? I have added docs for carts and partially updated docs for users, building upon @c4rth products' example.

image

safdevke avatar Apr 03 '24 11:04 safdevke