Unofficial OpenAPI 2.0 (aka Swagger) definition for Duolingo API.
The validation and codegen was tested for Golang with go-swagger.
Code generation for other languages is possible with official swagger-codegen.
Check out interactive documentation.
Validate documentation:
# go-swagger
swagger validate
# node.js swagger
npx swagger validate swagger.yamlGenerate client:
# go-swagger
swagger generate client -f ./duolingo-api/swagger.yaml
# swagger-codegen, e.g. for python
swagger-codegen generate -i swagger.yaml -l python -o ../pySee more documentation for Go swagger on https://goswagger.io.
Generate interactive documentation with Redoc:
npx swagger-merger -i swagger.yaml -o swagger-complete.yaml
npx @redocly/cli build-docs swagger-complete.yamlUsage of swagger-merger is required, because paths references are not resolved correctly with some third-party tools for swagger.
On Windows:
powershell -ExecutionPolicy Bypass -File .\redoc.ps1On Linux/MacOS:
./redoc.shFor mocking purpose Prism is used:
npx swagger-merger -i swagger.yaml -o swagger-complete.yaml
npx prism mock swagger-complete.yaml
- Golang
- ...
If you wish to add more implementations in other programming languages, I would be happy to support you. Also, if you want to extend the specification with more feaures, feel free to create a pull request.