Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Write glue code to link generated code (GHORG-15) #9

Merged
merged 10 commits into from
Mar 9, 2021

Conversation

nguyentoanit
Copy link
Contributor

No description provided.

@nguyentoanit nguyentoanit requested a review from moltar March 8, 2021 05:22
@nguyentoanit nguyentoanit self-assigned this Mar 8, 2021
@nguyentoanit nguyentoanit changed the title feat: Write glue code to link generated code feat: Write glue code to link generated code (GHORG-15) Mar 8, 2021
@moltar
Copy link
Contributor

moltar commented Mar 8, 2021

src/clients/uploads-api-client.ts Outdated Show resolved Hide resolved
src/clients/uploads-api-client.ts Outdated Show resolved Hide resolved
@moltar
Copy link
Contributor

moltar commented Mar 8, 2021

Weird, my other big comment did not post, I think. Did you get the comment with code examples about the API wrapping?

@nguyentoanit
Copy link
Contributor Author

Weird, my other big comment did not post, I think. Did you get the comment with code examples about the API wrapping?

This?

@moltar
Copy link
Contributor

moltar commented Mar 8, 2021

Weird, my other big comment did not post, I think. Did you get the comment with code examples about the API wrapping?

This?

Nope, it was a big comment with big code blocks.

@nguyentoanit nguyentoanit requested a review from moltar March 8, 2021 10:34
@nguyentoanit nguyentoanit force-pushed the feat/15-write-glue-code-to-link-generated-code branch from bdd0d8a to a67acba Compare March 9, 2021 04:07
@nguyentoanit nguyentoanit requested a review from moltar March 9, 2021 04:13
src/clients/uploads-api-client.ts Outdated Show resolved Hide resolved
src/types/api-configuration-parameters.ts Outdated Show resolved Hide resolved
import { apiErrorFactory } from './api-error-factory'

export class ApiClientHelpers {
static assertAxiosInstance(parameters?: APIConfigurationParameters): AxiosInstance {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these helpers a static method, and other helpers just functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moltar : I just want to wrap them for API parameter assertions. Therefore, I used a class with static method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But src/helpers/is-json-mime.ts is also an API parameter assertion?

Also, those static methods aren't strictly assertions IMO. Assertion functions always throw if something is not right, or pass if something is right. There is no return.

Copy link
Contributor

@moltar moltar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks ok, except one question regarding helpers.

Could you please explain your decision to separate the helpers into functions and static methods?

@moltar
Copy link
Contributor

moltar commented Mar 9, 2021

Please squash when merging.

@nguyentoanit nguyentoanit force-pushed the feat/15-write-glue-code-to-link-generated-code branch from a3b90b0 to 9a2dbf8 Compare March 9, 2021 10:30
@nguyentoanit nguyentoanit marked this pull request as ready for review March 9, 2021 10:33
@nguyentoanit nguyentoanit merged commit 994d0ea into master Mar 9, 2021
@nguyentoanit nguyentoanit deleted the feat/15-write-glue-code-to-link-generated-code branch March 9, 2021 10:39
github-actions bot pushed a commit that referenced this pull request Mar 25, 2021
# 1.0.0 (2021-03-25)

### Bug Fixes

* api configuration parameters's properties ([dc2da96](dc2da96))
* export combine schemas ([374f532](374f532))
* remove decoder from src folder ([10f3b46](10f3b46))
* remove helpers exporting ([96d5c36](96d5c36))
* remove unnecessary and private stuff exporting ([4362ddc](4362ddc))
* use generator v4.1.3 to fix build error ([c324f6a](c324f6a))
* use join method on set collection of api model code ([2d063d6](2d063d6))
* using generator v5.0.1 with type mapping to resolve build issue ([a8c3463](a8c3463))

### Features

* add isSandbox option ([644159c](644159c))
* allow user set roleArn ([7159ec7](7159ec7))
* automate client version number dumps ([e21d3d6](e21d3d6))
* check new commits before re-generate models (GHORG-38) ([03c4ecb](03c4ecb))
* implement decoder and scripts to generate api model code commands ([0abe7ee](0abe7ee))
* init api models ([624eed9](624eed9))
* Write glue code to link generated code (GHORG-15) ([#9](#9)) ([994d0ea](994d0ea))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants