An example API with TypeScript support and basic login mechanism based on JWT
npm install && npm run dev
First login and copy generated token.
curl -H 'Accept: application/json' -X POST -d 'username=test' http://localhost:3000/v1/login
Now you can see openapi.json
curl -H 'Accept: application/json' -X GET -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' http://localhost:3000/v1/docs
Or you can list users
curl -H 'Accept: application/json' -X GET -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' http://localhost:3000/v1/users
Just visit redoc.html
via your browser