OpenAPI 3.0.3 spec for the Wanikani API

Hi there,

Inspired by @dogboydog Wanikani CLI tool here: WaniKani CLI + Typescript API library - I thought it might be useful if we had an OpenAPI spec for the Wanikani API, to make it easy to generate clients regardless of which language you’re working in. To that end, I’ve scraped and transcribed all of the endpoints, request/response bodies, documentation and examples from WaniKani API Reference into an OpenAPI v3 spec document. The repository is here: GitHub - jleskovar-tyro/wanikani-oas-spec

You can test it out by copying the yaml into https://editor.swagger.io/, plugging in your API key and playing around with it.

I’ve successfully generated clients for Typescript using a couple of different client generators (OpenAPITools “typescript-axios” and openapi-typescript-codegen), which I’m actively using in a couple of my own pet projects. There is a known issue with some of the OpenAPITools client generators, that don’t seem to handle the “OneOf” construct nicely (used to describe Subjects, which can be either Kanji, Radicals or Vocabs). There are various workarounds though, and hopefully the generators improve over time.

Anyway, just thought I’d share. Hope somebody finds this useful :slight_smile:

6 Likes