| name | java |
|---|---|
| description | Java 17, package layout, naming, JSON/Jsoup, Javadoc — use when editing any production or test Java in this repo |
- Editing any
.javafile under this repository. - Adding dependencies or debating style vs other Contentstack SDKs.
- Java 17 via
maven-compiler-plugin<release>17</release>inpom.xml. Ignore legacymaven.compiler.source/target1.8— the compiler plugin wins. - Avoid raw types; use generics where applicable.
- Production code lives under
com.contentstack.utilsand subpackages:render,node,embedded,helper,interfaces. - Do not add new top-level packages without team alignment.
- Classes: PascalCase (
Utils,DefaultOption,AutomateCommon). - Methods / variables: camelCase.
- Tests: Mixed conventions already in use — see
skills/testing/SKILL.md.
- Prefer
org.json(JSONObject,JSONArray) for APIs and internals used byUtilsandGQL. - Use Jsoup for RTE HTML; follow patterns in
AutomateCommonandUtils.
javax.validation.constraints(e.g.@NotNull) on some public methods — keep Javadoc aligned with null behavior.- Private constructors for non-instantiable types where the codebase already does (
GQL,AutomateCommon).
- Small JAR consumed by the Contentstack Java SDK — prefer minimal dependencies; justify additions in
pom.xml. - No Lombok in this repo unless explicitly adopted by the team.
- Javadoc on public API; examples must match real entry points (
Utils.render,GQL.jsonToHTML,DefaultOption).
skills/contentstack-utils-java/SKILL.md— RTE, embedded, GraphQL shapes.skills/testing/SKILL.md— test naming and layout.AGENTS.md— tech stack summary.