api-specs icon indicating copy to clipboard operation
api-specs copied to clipboard

Set up RapiDoc

Open keunes opened this issue 2 years ago • 8 comments

Use https://github.com/rapi-doc/RapiDoc to get something pretty like the Podcast Index API specs (code)

keunes avatar Feb 24 '23 08:02 keunes

Whats the advantage of RapiDoc over Swagger in our scenario?

georgkrause avatar Feb 24 '23 12:02 georgkrause

@keunes ping :)

georgkrause avatar Mar 13 '23 13:03 georgkrause

I will take care for this as soon as the task is clear. Plan is to use Github Actions and Pages.

georgkrause avatar Mar 13 '23 13:03 georgkrause

@georgkrause Pong

Whats the advantage of RapiDoc over Swagger in our scenario?

I have no idea as I'm not familiar with Swagger and only know RapiDoc from the consumption side. Maybe @Sporiff has something to add here?

keunes avatar Mar 13 '23 22:03 keunes

I have no idea as I'm not familiar with Swagger and only know RapiDoc from the consumption side. Maybe @Sporiff has something to add here?

@keunes Swagger UI, RapiDoc, and Redocly will all offer us much the same thing. Rapidoc takes significantly less initial setup since we can just throw an HTML page up and point it at a Yaml file, but none of them are particularly difficult.

The advantage of Swagger UI is we wouldn't be pulling JS from a CDN each time.

Sporiff avatar Mar 13 '23 23:03 Sporiff

The advantage of Swagger UI is we wouldn't be pulling JS from a CDN each time.

@Sporiff Thats easy enough to avoid, though. But what is your argument against a CDN?

georgkrause avatar Mar 15 '23 12:03 georgkrause

@georgkrause no particular argument, it's just another call. I don't consider it as much of an issue as lack of theming 😛

Sporiff avatar Mar 15 '23 15:03 Sporiff

@Sporiff I guess we could close this one?

I do like the field-level explanations for the responses - we should add the descriptions in our Open API schema file - created #117.

I also think the Podcast Index API specs is a bit easier to process than our API explorer. It looks a bit cleaner thanks to:

  • the example & schema being separated by a switch (you don't see both at the same time)
  • the different pieces of info (name, type, description) of each field being a bit more compact and one one line/in one row
  • the nesting in a response (e.g. the individual subscriptions in our subscriptions endpoint) being expanded by default

Are these things we could configure, or could request support for from the Astro folks?

image

image

keunes avatar Nov 03 '24 21:11 keunes