Skip to content

FRESH-TUNA/HALO

Repository files navigation

HALO

Maven Central

Description

This project provides a variety of tools to help you develop restful APIs and parse UriTemplate in kotlin/java environments.

We are currently working on creating a tool to parse templates in compliance with (RFC 6570) standards.

How to install?

# gradle
implementation("io.github.fresh-tuna:halo:1.0.5-beta")

# maven
<dependency>
    <groupId>io.github.fresh-tuna</groupId>
    <artifactId>halo</artifactId>
    <version>1.0.5-beta</version>
</dependency>

features

LinkBuilder

Tools to create links to access the resources needed to create a restful API.

SimpleLinkBuilder

  • help to create link(url).
  • supports simple string expand feature of hal ex) /users/{userId} -> /users/1
  • Adding query feature ex) ?a=1&b=2&c=3)
  • usecases

UriTemplateLinkBuilder

  • help to expand UriTemplate (RFC 6570) based template to create url.
  • Currently supporting simple string expand, form query expand of UriTemplate
  • usecases

TemplateParser

Tools to parse Template

  • interface to all Parsers
  • Parsers can be chained to parse templates with multiple rules. (Decorator pattern)
  • Supports to parse simple string in UriTemplate (RFC 6570)
  • ex) /users/{userId} -> /users/1
  • ex) {?name}, {?page,sort,size} -> ?name=tuna, ?page=1&sort=2&size=3
  • Used in SimpleLinkBuilder, UriTemplateLinkBuilder

About

This project provides a variety of tools to help you develop restful APIs and parse HAL templates in kotlin environments.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages