Coder Social home page Coder Social logo

fsiddiqi / dxc-halstack-browser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dxc-technology/halstack-browser

0.0 1.0 0.0 1.33 MB

This is a React component for visually browsing hypermedia REST APIs

License: Apache License 2.0

HTML 5.01% CSS 1.35% JavaScript 93.64%

dxc-halstack-browser's Introduction

Halstack Browser

Halstack Browser is a React component that can be included in any React Web App and provides a visual mechanism to crawl and discover API resources and operations dynamically for hypermedia-based APIs. In contrary to other path-based approaches such as OpenAPI (where static specs are used to describe a list of pre-defined path resources and available operations) Halstack Browser allows both API consumers and producers work with auto-discoverable REST APIs just based on their implementations, without any spec. Thus, every time an API implementation changes, these updates will be automatically visible in Halstack Browser Web component without the need of importing or configuring any API spec.

Halstack Browser in Action

See this demo app using Halstack browser. Paste your hypermedia-based API endpoint and start browsing!

Use

Installation

npm install --save @diaas/hal-ui

Implementation example

// import the HalUI component
import HalUI from "@diaas/hal-ui";

// use the component in your app
<HalUI url={api_base_url} headers={headers_object} />

Properties

Name Type Default Description
url String None Required. This property contains the base url of your HAL API.
headers JSON Object None Contains an object with the headers to be sent to every request to the API.

Develop

In the first place, clone this repository.

git clone https://github.dxc.com/DIaaS/diaas-hal-ui.git

Local development is broken into two parts, related to the lib/example folders.

First, within the lib folder, run rollup to watch your src/ module and automatically recompile it into dist/ whenever you make changes.

cd lib
npm install
npm start # runs rollup with watch flag

The second part will be running the example/ create-react-app that's linked to the local version of your module.

# (in another tab)
cd example
npm install
npm start # runs create-react-app dev server

Now, anytime you make a change to your library in src/ or to the example app's example/src, create-react-app will live-reload your local dev server so you can iterate on your component in real-time.

License

See Halstack Browser License here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.