Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

build: Generate TypeScript types from OpenAPI definition #55

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

firstred
Copy link
Contributor

@firstred firstred commented Jan 23, 2020

Requires:

This PR will add a script to automatically generate TypeScript types from bunq's OpenAPI definition.

It looks like not all required properties are marked as such in the OpenAPI definition, so there is a way to add these via the script.
To prevent types from being flattened to just primitives such as string, there is the possibility to extend the definition as well.

Generating a new definition file can be done with yarn build:types. Definitions end up in the file src/Types/ApiTypes.ts

A backward compatible layer has been added.

@codecov
Copy link

codecov bot commented Jan 23, 2020

Codecov Report

Merging #55 into master will decrease coverage by 39.27%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #55       +/-   ##
===========================================
- Coverage   98.65%   59.38%   -39.28%     
===========================================
  Files          71       17       -54     
  Lines        2236      517     -1719     
  Branches      461       96      -365     
===========================================
- Hits         2206      307     -1899     
- Misses         29      209      +180     
  Partials        1        1
Impacted Files Coverage Δ
src/HTTP/SignRequestHandler.ts 6.81% <0%> (-93.19%) ⬇️
src/HTTP/VerifyResponseHandler.ts 10.25% <0%> (-89.75%) ⬇️
src/HTTP/EncryptRequestHandler.ts 17.64% <0%> (-82.36%) ⬇️
src/ApiAdapter.ts 12.12% <0%> (-80.81%) ⬇️
src/Helpers/Utils.ts 77.77% <0%> (-22.23%) ⬇️
src/Crypto/Rsa.ts 81.25% <0%> (-18.75%) ⬇️
src/HTTP/Request.ts 90.16% <0%> (-9.84%) ⬇️
src/Crypto/Aes.ts 94.28% <0%> (-5.72%) ⬇️
src/Api/SchedulePayment.ts
src/Api/Avatar.ts
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90baf09...c4daac9. Read the comment docs.

@flow-danny
Copy link

Can this be merged? Would very much like to use this 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants