JSON

2 posts
TypeScript

A Good Way How to Validate Types in TypeScript

TL;DR: I've created a typescript library fp-ts-type-check. You can use it to validate the structure of data you get from outside of your application.

Here's the situation: your typescript application needs to retrieve some object via some API. You make an API request and you get a successful response with some json. Probably it's the data you expect but you can't say for sure. Your actions?

PHP

Creating an API Documentation in Swagger Using YAML

UPD: I wrote this for swagger v1.2. Stuff has changed since then. Now swagger supports single-file YAML specifications, so making them is easier now. What a time to be alive!

A few days ago was the first time I created a REST API documentation. This is the report on how I did it.