CLAUDE.md
dotCMS/src/main/java/com/dotcms/rest/CLAUDE.mdCLAUDE.md
Quality
57/100
Scores the file, not the repository.Length
316 words
8 headings · 1 code blocksRepository
949
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# dotCMS REST API Guide for Claude AI23## 📋 Essential Reference45**👉 REQUIRED: Read [README.md](./README.md) for comprehensive REST API development guidelines**67This file contains **AI-specific instructions only**. You MUST follow all patterns, standards, and checklists in README.md.89---1011## 🤖 AI-Specific @Schema Rules1213### Quick Decision Matrix1415| Method Returns | Use @Schema |16|---------------|-------------|17| `ResponseEntity<UserView>` | `implementation = ResponseEntityUserView.class` |18| `ResponseEntity<List<T>>` | `implementation = ResponseEntityListView.class` |19| `List<MyEntity>` | `implementation = MyEntityListView.class` ¹ |20| `Map<String, MyType>` | `implementation = MapStringMyTypeView.class` ¹ |21| `Map<String, Object>` | `type = "object", description = "..."` |22| `JSONObject` / AI APIs | `type = "object", description = "...", example = "..."` |2324¹ *Create if doesn't exist: `class MyEntityListView extends ArrayList<MyEntity>`*2526### 🚨 FORBIDDEN for AI2728```java29❌ @Schema(implementation = Object.class) // Use type = "object" instead30❌ @Schema(implementation = Map.class) // Use specific view class31❌ @Schema(implementation = HashMap.class) // Use specific view class32❌ Missing descriptions on type = "object" // Always add description33```3435### ✅ AI Description Requirements3637For `@Schema(type = "object")`:38- **Analyze the method's business logic** to understand what data is returned39- **Be specific**: "AI search results with contentlets and fragments" not "JSON object"40- **Add examples** for complex AI/external API responses41- **Pattern**: "[Service] [operation] response containing [specific data] and [metadata]"4243---4445## 🎯 AI Workflow46471. **READ** [README.md](./README.md) patterns and requirements482. **ANALYZE** method return statement - wrapped vs unwrapped?493. **CHECK** if specific view class exists for the return type504. **APPLY** correct @Schema from decision matrix above515. **VERIFY** against [README.md checklist](./README.md#summary-checklist)5253### Critical AI Verification54- ✅ Schema matches actual return type (not generic Object.class)55- ✅ All `type = "object"` have meaningful descriptions56- ✅ Descriptions explain actual data structure57- ✅ No deprecated Object.class/Map.class patterns remain5859**Goal**: Create precise API documentation that helps developers understand exactly what each endpoint returns.
Also in dotCMS/core
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| dotCMS/core.github/copilot-instructions.md · 949 | Copilot instructions | setupbuildtestlint-format+11 | 84/100 | today | |
| dotCMS/corecore-web/apps/dotcms-ui-e2e/AGENTS.md · 949 | AGENTS.md | setupstylearchtesting-strategy+2 | 78/100 | 3 days ago | |
| dotCMS/corecore-web/apps/mcp-server/CLAUDE.md · 949 | CLAUDE.md | setupbuildtestlint-format+5 | 89/100 | 3 days ago | |
| dotCMS/core.cursor/rules/doc-updates.mdc · 949 | Cursor rules | docs | 30/100 | 3 days ago | |
| dotCMS/core.cursor/rules/dotcms-guide.mdc · 949 | Cursor rules | archdo-notdocs | 69/100 | 3 days ago | |
| dotCMS/core.cursor/rules/e2e-rules.mdc · 949 | Cursor rules | setupteststylearch+5 | 89/100 | 3 days ago | |
| dotCMS/core.cursor/rules/frontend-context.mdc · 949 | Cursor rules | teststyledocs | 78/100 | 3 days ago | |
| dotCMS/core.cursor/rules/java-context.mdc · 949 | Cursor rules | buildstyle | 44/100 | 3 days ago | |
| dotCMS/core.cursor/rules/test-context.mdc · 949 | Cursor rules | testtesting-strategy | 54/100 | 3 days ago | |
| dotCMS/core.github/instructions/frontend.instructions.md · 949 | Copilot instructions | testlint-formatstylearch+3 | 69/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| dotCMS/corecore-web/AGENTS.md · 949 | AGENTS.md | style | 63/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/apps/dotcms-ui/AGENTS.md · 949 | AGENTS.md | buildteststyledependencies+3 | 94/100 | 3 days ago | |
| dotCMS/corecore-web/libs/block-editor/CLAUDE.md · 949 | CLAUDE.md | archdo-not | 69/100 | 3 days ago | |
| dotCMS/corecore-web/libs/new-block-editor/CLAUDE.md · 949 | CLAUDE.md | lint-formatstyledo-notagent-behaviour | 61/100 | 3 days ago | |
| dotCMS/corecore-web/libs/portlets/CLAUDE.md · 949 | CLAUDE.md | setupteststyleui+1 | 77/100 | 3 days ago | |
| dotCMS/corecore-web/libs/portlets/edit-ema/portlet/src/lib/store/CLAUDE.md · 949 | CLAUDE.md | teststylearchtypes+2 | 65/100 | 3 days ago | |
| dotCMS/corecore-web/libs/sdk/client/CLAUDE.md · 949 | CLAUDE.md | setupbuildtestlint-format+9 | 97/100 | 3 days ago | |
| dotCMS/corecore-web/libs/sdk/react/CLAUDE.md · 949 | CLAUDE.md | setupbuildtestlint-format+9 | 97/100 | 3 days ago |
Diff against .github/copilot-instructions.md Diff against core-web/apps/dotcms-ui-e2e/AGENTS.md Diff against core-web/apps/mcp-server/CLAUDE.md Diff against .cursor/rules/doc-updates.mdc Diff against .cursor/rules/dotcms-guide.mdc Diff against .cursor/rules/e2e-rules.mdc Diff against .cursor/rules/frontend-context.mdc Diff against .cursor/rules/java-context.mdc Diff against .cursor/rules/test-context.mdc Diff against .github/instructions/frontend.instructions.md Diff against CLAUDE.md Diff against core-web/AGENTS.md Diff against core-web/CLAUDE.md Diff against core-web/apps/dotcms-ui/AGENTS.md Diff against core-web/libs/block-editor/CLAUDE.md Diff against core-web/libs/new-block-editor/CLAUDE.md Diff against core-web/libs/portlets/CLAUDE.md Diff against core-web/libs/portlets/edit-ema/portlet/src/lib/store/CLAUDE.md Diff against core-web/libs/sdk/client/CLAUDE.md Diff against core-web/libs/sdk/react/CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| carrot-foundation/middle-earthCLAUDE.md · 0 | CLAUDE.md | setupbuildtestlint-format+6 | 97/100 | 3 days ago |
