@4geit/rct-swagger-client-container

1.0.0 • Public • Published

@4geit/rct-swagger-client-container npm version


swagger-client container to connect to a swagger based API

Demo

A live storybook is available to see how the container looks like @ http://rct-swagger-client-container.ws3.4ge.it

Installation

  1. A recommended way to install @4geit/rct-swagger-client-container is through npm package manager using the following command:
npm i @4geit/rct-swagger-client-container --save

Or use yarn using the following command:

yarn add @4geit/rct-swagger-client-container

Make sure you also have those tools installed globally in your system since @4geit/rct-swagger-client-container requires them to work properly:

  • create-react-app: sudo npm i -g create-react-app
  • storybook: sudo npm i -g @storybook/cli
  1. Depending on where you want to use the container you will need to import the class RctSwaggerClientContainer to your project JS file as follows:
import { RctSwaggerClientContainer } from '@4geit/rct-swagger-client-container'

For instance if you want to use this container in your App.js component, you can use the RctSwaggerClientContainer container in the JSX code as follows:

import React from 'react'
// ...
import { RctSwaggerClientContainer } from '@4geit/rct-swagger-client-container'
// ...
const App = () => (
  <div className="App">
    <RctSwaggerClientContainer/>
  </div>
)

Usage

  1. You can actually use the container rct-swagger-client-container alone by running the command:
yarn start

Make sure the dependencies are all installed by running the command yarn.

  1. rct-swagger-client-container comes along with storybook already setup therefore you can use it by running the command:
yarn storybook

The storybook is also deployed online and available @ http://rct-swagger-client-container.ws3.4ge.it

Readme

Keywords

none

Package Sidebar

Install

npm i @4geit/rct-swagger-client-container

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • geraldinestarke
  • fabianstarke
  • canercandan