Skip to content

feat: add x-semantic-type annotation (long-text) - #11

Merged
kozmaadrian merged 5 commits into
mainfrom
longtext
Jul 29, 2026
Merged

kozmaadrian merged 5 commits into
mainfrom
longtext

Conversation

@kozmaadrian

@kozmaadrian kozmaadrian commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator

Adds x-semantic-type, a vendor annotation that declares the semantic kind of a
string field. First recognized value: long-text (long-form, multi-line text).

  • Compiles onto the model node as node.semanticType for recognized values only.
  • Unknown values and type mismatches are dropped; enum takes precedence.
  • Presentation hint only — does not affect validation.
  • Documented in docs/schema-spec.md (§3, Vendor annotations).

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Carry the x-semantic-type vendor annotation onto string model definitions
so consumers can select a control JSON Schema has no keyword for. Only
recognized values (currently long-text) are surfaced; an unknown value is
dropped so a consumer never receives a hint it can't act on. enum takes
precedence; the annotation is ignored on non-string types.
Copy semanticType from the compiled definition onto the built model node
(alongside enumValues) so renderers can select a control. Typed in
index.d.ts.
Add x-semantic-type to the §3 annotations table plus a short subsection
covering its recognized value (long-text), string-only scope, enum
precedence, and unknown-value fallback — following the spec's per-keyword
table-and-example pattern.
@kozmaadrian
kozmaadrian merged commit 8f6bfc9 into main Jul 29, 2026
5 checks passed
@kozmaadrian
kozmaadrian deleted the longtext branch July 29, 2026 13:28
github-actions Bot pushed a commit that referenced this pull request Jul 29, 2026
# [0.2.0](v0.1.2...v0.2.0) (2026-07-29)

### Features

* add x-semantic-type annotation (long-text) ([#11](#11)) ([8f6bfc9](8f6bfc9))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant