-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: Write glue code to link generated code (GHORG-15) #9
Conversation
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. |
bdd0d8a
to
a67acba
Compare
import { apiErrorFactory } from './api-error-factory' | ||
|
||
export class ApiClientHelpers { | ||
static assertAxiosInstance(parameters?: APIConfigurationParameters): AxiosInstance { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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?
Please squash when merging. |
…nfigurationParameters
a3b90b0
to
9a2dbf8
Compare
# 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))
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.