next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

Swagger like solution for documenting APIs?

Open fnick851 opened this issue 3 years ago • 3 comments

I know with next-drupal front end developers do not work directly with the RESTful API endpoints.

But is there a solution similar to Swagger that documents all the possible APIs that the front end can call? I think this helps if the front end developer does not work on the Drupal backend. He/she might has little knowledge and need to look up a documentation for APIs.

Thanks.

fnick851 avatar Jun 14 '22 18:06 fnick851

Drupal has OpenAPI which works with Swagger.

Can you give this a try?

shadcn avatar Jun 15 '22 08:06 shadcn

@fnick851 Did this work?

shadcn avatar Jul 06 '22 08:07 shadcn

Yes this works, but can be little slow on client browser because json:api-documentation is quite big.

also redoc is an option, but performance is issue as well there.

for swagger-ui this patch here can be helpful the have filter option avaiable: https://www.drupal.org/project/openapi_ui_swagger/issues/3259746

what also would be nice if types can be generated with orval or something else...

devtim123 avatar Sep 15 '22 11:09 devtim123