npm swagger-typescript-api 2.0.0
2.0.0 Release

latest releases: 13.2.9, 13.2.8, 13.2.7...
4 years ago

Features:

BREAKING_CHANGES:

  • Requests returns Promise<HttpResponse<Data, Error>> type.
    HttpResponse it is Fetch.Response wrapper with fields data and error
    Example:
      const api = new Api()
      
      //
      const response: HttpResponse<Data, Error> = await api.fruits.getAll()
    
      response.data // Data (can be null if response.ok is false)
      response.error // Error (can be null if response.ok is true)
  • Breaking changes in the client.mustache template. Needs to update local custom templates.

Fixes:

  • Security configuration in methods. When the security definition is in the main configuration of the swagger definition

Don't miss a new swagger-typescript-api release

NewReleases is sending notifications on new releases.