DonutSMP API Documentation banner

DonutSMP API Documentation

6 devlogs
10h 0m 3s

DonutSMP’s API is really badly written so I fixed that. The API documentation renderer written in Svelte has expandable TS fields, .d.ts generation and much more.

Demo Repository

Loading README...

lenny

Shipped this project!

Hours: 10.0
Cookies: 🍪 171
Multiplier: 17.11 cookies/hr

I learnt Svelte for this project and I must say it’s quite good. Also worked out how to render trees (for JSON and stuff) and turn those trees into declarations for typescript. Quite happy about how it turned out and I’ve been using it for my newer projects that use the API!

lenny

I’ve added the last two endpoints for stats and lookup. All the work for rendering has been done already so it’s quite easy to create new endpoints.

Attachment
0
lenny

I’ve added all the leaderboard endpoints and i’ve also created a contents sidebar to quickly find a certain endpoint.

Attachment
0
lenny

The website can now generate interfaces for TypeScript with the click of a button. This was quite easy as the schemas were stored in a way that I could just re-format using template literals.

Attachment
0
lenny

Added some syntax highlighting, and more types like records.

Attachment
0
lenny

I added a way to define a schema which gets rendered into a tree view thing with comments. I didn’t want to render into JSON because i wanted to have typescript-esque type annotations like you can see in the screen shot I have used a union which would just not exist in JSON ( i would have to define it as a string)

Attachment
0
lenny

I’ve created a page with bootstrap and svelte (i heard it was good so i learnt it for this) and I’ve started parsing the specification and rendering it!

Attachment
0