Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@archeion/swagger-angular-api

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@archeion/swagger-angular-api

A library that can convert an OpenAPI spec to angular services

  • 1.0.0-alpha.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@archeion/swagger-angular-api

npm License

@archeion/swagger-angular-api is a collection of templates designed to be used with swagger-typescript-api. These templates facilitate the generation of Angular services from an OpenAPI specification, making it easier to integrate APIs into Angular applications.

Installation

To install the library, you can use npm or yarn:

npm install @archeion/swagger-angular-api swagger-typescript-api

or

yarn add @archeion/swagger-angular-api swagger-typescript-api

Usage

This library is not intended to be used standalone. Instead, you need to import the templates provided by this library into swagger-typescript-api to generate Angular services for your Swagger APIs.

Here's an example of how to use the templates with swagger-typescript-api:

   const { generateApi } = require('swagger-typescript-api');
   const path = require('path');

   generateApi({
     name: 'MyAPI',
     output: path.resolve(__dirname, './src/app/api'),
     url: 'https://your-api-spec-url.com/swagger.json',
     templates: path.resolve(__dirname, './node_modules/@archeion/swagger-angular-api/templates/angular'),
     // Currently only modular mode is supported.
     modular: true
   })
     .then(() => {
       console.log('Angular services generated successfully!');
     })
     .catch((err) => {
       console.error('Error generating Angular services:', err);
     });

Or you can head over swagger-typescript-api documentation to find instruction for CLI options.

$ npx swagger-typescript-api --templates ./node_modules/@archeion/swagger-angular-api/templates/angular --modular <OTHER_OPTIONS_HERE>

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request with your changes.

Acknowledgments

Special thanks to the developers of swagger-typescript-api for their foundational work.

Keywords

FAQs

Package last updated on 21 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc