• Stars
    star
    149
  • Rank 248,619 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An API explorer for RESTful Hypermedia APIs using HAL or HAL-FORMS

build coverage maven-central MIT

HAL Explorer

With HAL Explorer you can browse and explore HAL and HAL-FORMS based RESTful Hypermedia APIs. HAL Explorer was inspired by Mike Kelly’s HAL-Browser. HAL Explorer also supports Spring Profiles.

Documentation, Demos & Cloud Deployment

Here you find the documentation for the latest release and the current snapshot, as well as a demo (with examples) of the latest release and the current snapshot:

Release

1.2.1

Reference Documentation

HAL Explorer Demo

Snapshot

1.2.2-SNAPSHOT

Reference Documentation

HAL Explorer Demo

You also find current release at https://hal-explorer.com.

TL;DR

HAL Explorer

Features

  • Responsive design

  • Syntax highlighted response body

  • Custom request headers

  • Available Themes

  • 2 layouts

    • 2 columns layout with optional documentation

    • 3 columns layout with documentation always visible if available

  • API URL, theme, layout, and request headers stored as URL fragment

  • Support for Spring Data Rest profiles to populate properties in request editor

  • Support for HAL-FORMS templates

    • Template elements in response explorer (see screenshot)

    • Template properties in request editor

    • Options support in request editor

  • HAL-FORMS property constraint validation in request editor

Demos with Spring based Backends

You can also play with the latest snapshot version of HAL Explorer in demos that provide backends implemented with Spring. I host these demos at Heroku, so please give them a bit of time to warm up (this might take up to 1 minute).

Development Server

Run yarn start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files. The development server has a build-in proxy configuration so that all calls to /api are forwarded to localhost:8080/api. This is convenient when you want to test a local server without having to deal with CORS. If you run yarn startl, an additional file server is started with port 3000. In the test-data directory, you find some JSON examples. Try it out with the URL http://localhost:4200/#uri=http://localhost:3000/movies.hal-forms.json.

Build

Run yarn build to build the project in production mode. The build artifacts will be stored in the dist/ directory.

Gradle/Java Build Support

If you have Java installed, you can also build the project with Gradle. The Gradle build will install Node.js locally in the project directory. Run ./gradlew build to build the project in production mode. The build artifacts will be stored in the dist/ directory.

Integration in your Backends

If you want to use a released version of HAL Explorer in a Java-based project, you could define a dependency to the HAL Explorer WebJar.

Maven:

<dependency>
    <groupId>org.webjars</groupId>
    <artifactId>hal-explorer</artifactId>
    <version>1.2.1</version>
</dependency>

Gradle:

implementation 'org.webjars:hal-explorer:1.2.1'

When you use the WebJar with Spring Boot, you can access the HAL Explorer at /webjars/hal-explorer/1.2.1/index.html. The easiest way to integrate the upstream version of HAL Explorer into your backend would be to clone this Git repo, do a production build and then copy the content of the dist folder to a location accessible by your backend server. When you use Spring Boot, a good location in your project’s source tree would be src/main/java/resources/static/hal-explorer.

Running Tests

  • yarn test to run the unit test suite against your default browser.

  • yarn test-headless to run the unit test suite against headless Chrome.

  • yarn e2e to run the e2e test suite against your default browser.

  • yarn e2e-headless to run the e2e test suite against headless Chrome.

Take a look at package.json for more test options.

More Repositories

1

spring-hateoas-jsonapi

A JSON:API media type implementation for Spring HATEOAS
Java
104
star
2

chatty

A chat app demo with RESTful hypermedia API and server push.
Java
52
star
3

webapp-tutorial

This is tutorial material for building web apps with Spring Boot, Spring Data Rest, Angular and TypeScript.
TypeScript
51
star
4

e4-tutorial

These are the reference projects for my Eclipse 4 Application Platform tutorial.
Java
46
star
5

e4-rendering

A proof of concept for a generic e4 rendering engine that makes it easy to plug in specific UI toolkits.
Java
33
star
6

osgi-vaadin-demo

This demo shows how to create dynamic and modular Web applications with server-side OSGi and Vaadin as UI toolkit.
Java
22
star
7

cd-pipeline

A Continuous Delivery pipeline with Docker and Terraform.
HCL
16
star
8

microservice-60min

This is a demo for a microservice with a Spring Boot backend and an Angular frontend.
Java
15
star
9

gwt-mvp-contacts

An adoption of my e4 contacts demo for GWT, using the GWT MVP architecture with activities, places, event bus, etc.
Java
15
star
10

jcalendar

Java
13
star
11

JCalendar-NG

a Java date chooser component suite.
Java
6
star
12

angular2-typescript-demo

Playground for the upcoming Angular 2 together with TypeScript
TypeScript
4
star
13

pebble-chatty

some tests for Pebble development
JavaScript
4
star
14

godot-xr-game-demo

GDScript
3
star
15

microservice-demo

playground for microservices with spring boot and docker.
CSS
3
star
16

movies-demo

Java
3
star
17

jquery-mobile-demos

Here are the demos I use for upcoming talks about jQuery Mobile.
JavaScript
2
star
18

spring-hateoas-jsonapi-examples

Java
2
star
19

typescript-contacts-demo

This is my test project for developing a demo with typescript, javascript, jasmine, grunt, bower, etc.
TypeScript
1
star
20

spring-rest-workshop

The code examples for my workshop "Developing RESTful Hypermedia driven web services with Spring.
Java
1
star