What is IBF API Documentation?
IBF API Documentation describes the IBF REST API which allows programmatic controlled access to the IBF-database.
Disaster forecast, indicator and early action information is available in JSON format.
You need to be authorized to access this information. You must request 510.global for authorization.
How to update IBF API Documentation?
The official NestJS OpenAPI is the source reference. The NestJS Swagger module provides decorators to add to controllers and entities.
For example, /api/user
is defined in UserController
.
On line 35, ApiOperation decorator allows us to add a description using the summary
parameter.
On lines 36-40, ApiResponse decorator allows us to describe what the response object would look like.
On line 48 sets the expected structure of the request body. ApiProperty decorator allows us to provides example and default values via the example
and default
parameters respectively.
If we make changes to any of the defined decorators and their parameters, we would see a corresponding visual change in the documentation page.