Skip to content

feat(entity): support json clob blob content type#32638

Open
yuliuyi717-ux wants to merge 8 commits intojhipster:mainfrom
yuliuyi717-ux:codex/issue-14526-0311-0058
Open

feat(entity): support json clob blob content type#32638
yuliuyi717-ux wants to merge 8 commits intojhipster:mainfrom
yuliuyi717-ux:codex/issue-14526-0311-0058

Conversation

@yuliuyi717-ux
Copy link
Contributor

Summary

This PR adds explicit generator support for JSON-oriented CLOB fields by introducing a new blob content type: json.

What is included

  • Added json as a valid fieldTypeBlobContent value.
  • Added a CLI prompt option: A CLOB (JSON field) when selecting blob content for byte[] fields.
  • Mapped fieldTypeBlobContent=json to TextBlob while preserving the json marker for template logic.
  • Treated json as text-like (same as CLOB text) for:
    • faker/sample data generation,
    • content-type companion column generation,
    • liquibase column/load type generation,
    • DTO java type selection,
    • client-side content-type field generation.
  • Added targeted tests for conversion and field preparation behavior.

Why

TextBlob can store JSON payloads, but generation logic currently only distinguishes text / binary-oriented blob content.
This change makes JSON-CLOB usage explicit and consistent across generation paths while keeping existing TextBlob storage behavior.

Refs #14526

Validation

npx -y node@22 ./node_modules/.bin/tsc -p tsconfig.spec.json --noEmit
npx -y node@22 ./node_modules/.bin/esmocha generators/base-application/support/prepare-field.spec.ts generators/entity/single-entity.spec.ts generators/liquibase/generator.spec.ts --no-insight --forbid-only

@yuliuyi717-ux
Copy link
Contributor Author

Hi team, just a gentle follow-up on this PR when you have a moment. The changes are ready on my side, so if there’s anything you’d like adjusted or clarified, I’m happy to update it quickly. Thanks!

@mshima
Copy link
Member

mshima commented Mar 17, 2026

@yuliuyi717-ux thanks for the PR.
But it needs CI samples, UI integration, cypress integration.

@yuliuyi717-ux
Copy link
Contributor Author

Thanks for the pointer — I've pushed a follow-up covering the missing pieces.

This update adds:

  • CI sample coverage for the new json blob content type
  • UI integration checks to verify json blobs render through the text/textarea path
  • Cypress integration coverage to verify generated e2e code types json blob fields instead of treating them like file uploads

I also reran the focused validation for these paths locally, and it's green now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants