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.yaml
Generate 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 ../py
See 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 redoc-cli bundle swagger-complete.yaml
Usage of swagger-merger
is required, because paths references are not resolved correctly with some third-party tools for swagger.
For 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.