DEV Community

Sharad Raj (He/Him)
Sharad Raj (He/Him)

Posted on

7 1

Tools for generating REST API docs rapidly?

So let's assume you have this REST API in whatever foo language, how will you document it if in hurry or you don't want to do complex things just for the sake of it.

Let's have a discussion and share resources (-.-)

PS: It's 11pm here so I may be on sleep mode after some time.

Top comments (11)

Collapse
 
drsimplegraffiti profile image
Abayomi Ogunnusi

Swagger will do magic....But postman documentation is divine

Collapse
 
sharadcodes profile image
Sharad Raj (He/Him)

I hear about swagger a lot

Collapse
 
janstepien profile image
Jan Stępień

You can use content negotiation.

Whenever your API receives a request with Accept: text/html you respond with a static HTML file. It documents the resource available at the requested path. Your resources become self-documenting.

The HTML files can link to other resources served by your API. This makes it easier to navigate the entire documentation in a web browser.

I like this approach for its simplicity. It doesn't need any library and it works in every framework. Its main weakness is maintainability; the documentation won't keep itself up to date automatically.

Collapse
 
sharadcodes profile image
Sharad Raj (He/Him)

I'll be reading this in depth, heard for the first time. Thanks for sharing this :)

Collapse
 
ryanleonbutler profile image
ryanleonbutler

Swagger UI and ReDoc is nice. Fastapi also uses both.

github.com/swagger-api/swagger-ui
github.com/Redocly/redoc

Collapse
 
jwbwater profile image
James Bridgewater

The ReDoc documentation for an API I worked with was very nice, easy to read.

Collapse
 
sharadcodes profile image
Sharad Raj (He/Him) • Edited

I see this redoc more often than swagger when exploring REST APIs, probably because of the UI

Collapse
 
sharadcodes profile image
Sharad Raj (He/Him) • Edited

I'm seriously considering making a theme with clean ui for this stuff which would be autogenerated for APIs. I mean seriously, not every project needs swagger, but maybe we are going a level higher every few months to be not considered as laid-back .. 😂

Collapse
 
vicradon profile image
Osinachi Chukwujama • Edited

You should consider optic. It monitors your traffic and generates the endpoints and data associated with each end point.

Collapse
 
sharadcodes profile image
Sharad Raj (He/Him)

Oo.. Nice. Will try it out asap

Collapse
 
ericbond profile image
Eric

There is an interesting one combining Swagger, Postman, and JMeter. Great one: Apidog. At least take a try.

11 Tips That Make You a Better Typescript Programmer

typescript

1 Think in {Set}

Type is an everyday concept to programmers, but it’s surprisingly difficult to define it succinctly. I find it helpful to use Set as a conceptual model instead.

#2 Understand declared type and narrowed type

One extremely powerful typescript feature is automatic type narrowing based on control flow. This means a variable has two types associated with it at any specific point of code location: a declaration type and a narrowed type.

#3 Use discriminated union instead of optional fields

...

Read the whole post now!

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay