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.
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.
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!
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.
Log in to leave a comment
I’ve added all the leaderboard endpoints and i’ve also created a contents sidebar to quickly find a certain endpoint.
Log in to leave a comment
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.
Log in to leave a comment
Added some syntax highlighting, and more types like records.
Log in to leave a comment
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)
Log in to leave a comment
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!
Log in to leave a comment