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: OpenAPI integrated for mirror node models generation #329

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ivaylogarnev-limechain
Copy link
Contributor

@ivaylogarnev-limechain ivaylogarnev-limechain commented Feb 4, 2025

Description:
This PR integrates OpenAPI for generating Mirror Node models and incorporates their usage in the code where applicable. It also adds aliases for importing these models and includes various refactors.

Related issue(s):
#276

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@ivaylogarnev-limechain ivaylogarnev-limechain changed the title feat: Added mirror-node yaml file, generated models via openAPI, adde… feat: openAPI integrated for mirror node models generation Feb 4, 2025
@ivaylogarnev-limechain ivaylogarnev-limechain changed the title feat: openAPI integrated for mirror node models generation feat: OpenAPI integrated for mirror node models generation Feb 4, 2025
Signed-off-by: ivaylogarnev-limechain <[email protected]>
Copy link
Contributor

@rwalworth rwalworth left a comment

Choose a reason for hiding this comment

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

Do you think we should place instructions for generating these models somewhere in the README somewhere? Might be useful for anyone to know.

Also, is it common practice to name a directory with a .ts extension?

src/services/MirrorNodeClient.ts Show resolved Hide resolved
…roduced Taskfile

Signed-off-by: ivaylogarnev-limechain <[email protected]>
@ivaylogarnev-limechain
Copy link
Contributor Author

Do you think we should place instructions for generating these models somewhere in the README somewhere? Might be useful for anyone to know.

Also, is it common practice to name a directory with a .ts extension?

Yes, absolutely! I initially thought we were generating these models just for our own use, but you’re right—it’s important for everyone to be aware of the process. To address this, I’ve added a detailed section to the README explaining OpenAPI model generation. Additionally, I had previously handled the post-generation cleanup manually, but I’ve now introduced a Taskfile to automate the process.

As for the .ts extension in a directory name—no, that was definitely a typo :D

Copy link
Contributor

@rwalworth rwalworth left a comment

Choose a reason for hiding this comment

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

One last fix and then I think we're good to go. Thanks for integrating this, this is awesome!

@@ -13,7 +13,7 @@ import {
/**
* Tests for TokenMintTransaction
*/
describe("TokenMintTransaction", function () {
describe.only("TokenMintTransaction", function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
describe.only("TokenMintTransaction", function () {
describe("TokenMintTransaction", function () {

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

Successfully merging this pull request may close these issues.

2 participants