Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Latest commit

 

History

History
55 lines (39 loc) · 1.97 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.97 KB

generator.java

Build Status codecov

Code generator for Contentful models.

Contentful is a content management platform for web applications, mobile apps and connected devices. It allows you to create, edit & manage content in the cloud and publish it anywhere via powerful API. Contentful offers tools for managing editorial teams and enabling cooperation between organizations.

This tool can be used to fetch content types from a Contentful space, and generate corresponding java source files.

Link / Array fields that are restricted to exactly one content type (via field validation) will reference the generated class corresponding to that content type.

Setup

Download the latest JAR or grab via Maven:

<dependency>
  <groupId>com.contentful.generator</groupId>
  <artifactId>generator</artifactId>
  <version>1.2.0</version>
</dependency>

or Gradle:

compile 'com.contentful.generator:generator:1.2.0'

Usage

From the command line:

usage: generator.java
 -f,--folder <arg>    Destination folder path
 -p,--package <arg>   Destination package name
 -s,--space <arg>     Space ID
 -t,--token <arg>     Management API Access Token

The tool can also be used directly from code, refer to the documentation for more info.

License

Copyright (c) 2017 Contentful GmbH. See LICENSE for further details.