eclipse / microprofile-starter

MicroProfile project generator source code
Apache License 2.0
74 stars 51 forks source link

Add a REST API so apps can be downloaded from the command line #91

Closed mraible closed 5 years ago

mraible commented 5 years ago

Add a REST API, similar to what start.spring.io has. If you hit start.spring.io with curl or http, you get a list of options:

$ curl start.spring.io
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
:: Spring Initializr ::  https://start.spring.io

This service generates quickstart projects that can be easily customized.
Possible customizations include a project's dependencies, Java version, and
build system or build structure. See below for further details.

The services uses a HAL based hypermedia format to expose a set of resources
to interact with. If you access this root resource requesting application/json
as media type the response will contain the following links:
+-----------------+-----------------------------------------+
| Rel             | Description                             |
+-----------------+-----------------------------------------+
| gradle-build    | Generate a Gradle build file            |
| gradle-project  | Generate a Gradle based project archive |
| maven-build     | Generate a Maven pom.xml                |
| maven-project * | Generate a Maven based project archive  |
+-----------------+-----------------------------------------+
...

This API allows you to generate and download apps quickly from the command line, which is great for demos!

For example:

http https://start.spring.io/starter.zip dependencies==h2,lombok,data-jpa,data-rest,web packageName==com.okta.developer.demo -d
Karm commented 5 years ago

@mraible

rdebusscher commented 5 years ago

Fixed by https://github.com/eclipse/microprofile-starter/pull/156