20250114.0.2 • Published 11 months ago

@wajunworks/swagger-client v20250114.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

Contributors Forks Stargazers Issues MIT License LinkedIn

About The Project

In modern software development, integrating and maintaining consistent communication between backend services and frontend/mobile applications is crucial. To streamline this process, our project introduces an innovative solution: an automated SDK generator designed specifically for backend teams. This tool leverages the power of Swagger (OpenAPI) specifications to generate NPM packages that serve as SDKs. These SDKs facilitate seamless integration for frontend and mobile teams, promoting efficiency and reducing manual coding efforts.

Key Features

Automated SDK Generation:

The core functionality of our project is to automatically generate a Node.js SDK during the CI/CD pipeline. By utilizing Swagger JSON specifications, the generator creates clean, lightweight, and maintainable code.

CI/CD Integration:

The generator integrates seamlessly with CI/CD pipelines, ensuring that SDKs are up-to-date with the latest API changes. This automation reduces the need for manual intervention and ensures consistency across development environments.

Multi-Platform Support:

The generated SDK is designed to be versatile, supporting usage in both frontend and mobile development environments. It is compatible with any project that uses Node.js, making it a robust solution for various development teams.

Clean and Lightweight Code:

The SDK generator emphasizes producing clean, readable, and efficient code. This focus ensures that the SDK is easy to integrate, extend, and maintain.

Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

  • Next
  • React
  • Vue
  • Angular
  • Svelte
  • Laravel
  • Bootstrap
  • JQuery

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

Installation

Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.

  1. create a swagger.ts
 const generater = new SwaggerGenerator();
  await generater
    .setOpenApiSpecificationUrl(
      "https://xxx.json"
    )
    .setName("MobileApi")
    .buildAsync();
  1. run the swagger file
npx ts-node -O '{\"module\":\"commonjs\"}' test/Startup.ts
  1. then the client will locale in the project direcotry (/api)

Usage

the client will generate like

export class MobileApiClient {

	get axios(): AxiosInstance;

	get aIDiagnostic(): IAIDiagnosticClient;
	
}

you can use the client in your code like below, you should init the client instance in your framework recommand. like init the client as provider in react.js

const client = new MobileApiClient().

const data = await client.heallthrecord.bloodpressure.listAsync({});

For more examples, please refer to the Documentation

Roadmap

  • Generate Response Result
  • Support Request Path Parameter
  • Support Request Query Parameter
  • Support Request Body Parameter

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Jack Wong - @j113203 - jack.wong@j1.business

Project Link: https://github.com/j113203/swagger-client-generator

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

openapi3-ts

20250114.0.2

11 months ago

20250114.0.1

11 months ago

20250113.0.1

11 months ago

20250107.0.1

11 months ago

20241002.0.1

1 year ago

20240919.0.1

1 year ago

20240530.0.2

1 year ago

20240527.0.3

2 years ago

20240527.0.2

2 years ago

20240530.0.1

1 year ago

20240527.0.1

2 years ago

20240525.0.1

2 years ago

20240528.0.1

2 years ago

20240521.0.8

2 years ago

20240521.0.1

2 years ago

20240521.0.2

2 years ago

20240521.0.3

2 years ago

20240521.0.4

2 years ago

20240521.0.5

2 years ago

20240521.0.7

2 years ago

20240520.0.2

2 years ago

20240520.0.1

2 years ago