Skip to content

Develop#52

Merged
yojo-generator merged 7 commits intomasterfrom
develop
Apr 20, 2026
Merged

Develop#52
yojo-generator merged 7 commits intomasterfrom
develop

Conversation

@yojo-generator
Copy link
Copy Markdown
Owner

No description provided.

qwen-intl and others added 7 commits April 20, 2026 06:01
…and messages

Key features implemented:

- Dictionary.java: Added X_CLASS_ANNOTATION and X_FIELD_ANNOTATION constants
- Schema.java: Added classAnnotations field with getter/setter and integrated into toWrite() method
- Message.java: Added classAnnotations field with getter/setter and integrated into toWrite() method
- VariableProperties.java: Added fieldAnnotations field with getter/setter and integrated into toWrite() method
- AbstractMapper.java: Updated fillProperties() to handle x-field-annotation from propertiesMap and add to variableProperties.getFieldAnnotations()
- SchemaMapper.java: Updated mapSchemasToObjects() to handle x-class-annotation from schemaMap and add to schema.getClassAnnotations()
- MessageMapper.java: Updated mapMessagesToObjects() to handle x-class-annotation from payloadMap and add to message.getClassAnnotations()
- Added example usage in test.yaml showing MySchema with both x-class-annotation and x-field-annotation
- Added unit tests covering schema and message annotations with proper import validation

The changes follow existing patterns like x-enumNames and provide comprehensive support for custom annotations at both class and field levels for both schemas and messages, with automatic import management.
Key features implemented:
- Modified VariableProperties.java to extract simple annotation name and add full import for x-field-annotation
- Updated Schema.java to extract simple annotation name and add full import for x-class-annotation
- Changed annotation output from fully qualified names (e.g. @lombok.NonNull) to simple names (e.g. @nonnull) while maintaining imports

The changes ensure that annotations specified via x-field-annotation and x-class-annotation extensions are generated with their simple names in the output code while still importing the full class path.
…generation-e34f2

Update from task 621b38d6-1164-4d5f-accd-aa56d76e34f2
- Update README.md to include comprehensive documentation for custom annotation support including schema-level and field-level annotations with parameter examples
- Document x-class-annotation usage for adding custom class annotations at schema and message levels
- Document x-field-annotation usage for adding custom field annotations with parameters
- Add usage examples showing proper YAML syntax and resulting Java code generation
- Include these attributes in the supported attributes table with proper descriptions
- No changes to .gitignore as only documentation was updated
Update from task 50d983ef-aec3-4676-8964-761f3c59b275
…ations-2338d

✅ Supports **schema-level** and **message-level** class annotations, plus **field-level** annotations with parameters.
@yojo-generator yojo-generator merged commit 6807fcc into master Apr 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants