New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ama-sdk/generator-sdk

Package Overview
Dependencies
Maintainers
5
Versions
777
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ama-sdk/generator-sdk

Swagger specification SDK Generator by yeoman

  • 9.6.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

SDK Generator

This package provides a Yeoman generator to create an SDK based on an API swagger spec.

Setup

Yeoman is required to use this generator:

# Install Yeoman, @ama-sdk/core and the SDK generator
yarn add --dev yo @ama-sdk/generator-sdk @ama-sdk/core

How to use?

Typescript SDK

The typescript generator provides 2 generators:

  • shell: To generate the "shell" of an SDK package
  • core: To (re)generate the SDK based on a specified Swagger spec
  • create: To create a new SDK from scratch (i.e. chain shell and core)

For generating the shell, you can run:

yarn yo ./node_modules/@ama-sdk/generator-sdk/src/generators/shell

If using Yarn2+, you can use the following scripts in package.json:

    "resolve": "node -e 'process.stdout.write(require.resolve(process.argv[1]));'",
    "generate": "yo $(yarn resolve @ama-sdk/generator-sdk/src/generators/core) --swaggerSpecPath ./swagger-spec.yaml --force",
    "upgrade:repository": "yo $(yarn resolve @ama-sdk/generator-sdk/src/generators/shell)",

Use generate to (re)generate your SDK based on the content of ./swagger-spec.yaml (make sure you have this file at the root of your project) and upgrade:repository to regenerate the structure of your project.

Dart SDK

Generate a Dart SDK:

Make sure to have a ./swagger-spec.yaml file at the root of your project and run:

yarn yo ./node_modules/@ama-sdk/generator-sdk/src/generators/dart-core --swaggerSpecPath ./swagger-spec.yaml --swaggerConfigPath node_modules/@ama-sdk/generator-sdk/generators/dart-core/templates/swagger-codegen-dart/config/swagger-codegen-config.json --force

For more details please check: Dart generator doc

Java Resteasy client SDK

Generate a Java Resteasy SDK:

Make sure to have a ./swagger-spec.yaml file at the root of your project and run:

yarn yo ./node_modules/@ama-sdk/generator-sdk/src/generators/java-client-core --swaggerSpecPath ./swagger-spec.yaml --swaggerConfigPath node_modules/@ama-sdk/generator-sdk/generators/java-client-core/templates/swagger-codegen-java-client/config/swagger-codegen-config.json --force

For more details please check: Java resteasy client generator doc

Keywords

FAQs

Package last updated on 20 Mar 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