Commit 34fcd14
authored
refactor: migrate from nunjucks to react-sdk for code generation and handle curly-braces in operationID (#386)
* Migration from nunjucks to react-sdk for code generation
Broadly, the code changes covers the following:
- Efficient schema handling and class generation (for both JSON and AVRO)
- Support for complex JSON and AVRO schema (inheritences, nested objects and complex schema settings)
- Support for schema settings around field formats, constraints etc
- Proper binder configuration (for Solace, Kafka and RabbitMQ)
- Solace-specific: Queue/Topic handing in the binding configuration
- Revamped integration.test with support scripts for generating code from asyncapi files in mocks and compiling the generated code, generate report
- Support for all the template parameters and x-* custom overrides
* Update to README with information on how to use test scripts and integration test
* Updated README with info to enable debug logging
* Handled a case where the operationID contains curly-braces {}
* fix: resolve eslint errors for upstream PR compatibility
- Add missing toJavaClassName import in ApplicationYml.js
- Fix duplicate 'properties' key in avroProcessor.js (renamed to propertiesArray)
- Move ModelClass definition before SchemaModel to fix use-before-define
- Refactor nested ternary expressions into helper functions
- Fix brace-style issues (else-if on same line)
- Fix lonely-if by converting to else-if chain
- Add radix parameter to parseInt()
- Prefix intentionally unused variables with underscore
- Remove unused destructured variables in coreProcessor.js
- Update .eslintrc to ignore vars/args prefixed with underscore
- Add .eslintignore to exclude build artifacts
* Reduce code duplication to meet SonarQube <3% threshold
- Create utils/processorUtils.js with shared processor functions
- Create utils/schemaModel/BaseSchemaModel.js for common schema logic
- Create utils/packageUtils.js for AVRO package extraction
- Refactor avroProcessor and jsonProcessor to use shared utilities
- Refactor hooks/pre-process.js and post-process.js
- Add helper functions to components/Application.js
- Add test/run_output.sh script for running generated projects1 parent 97b0a4d commit 34fcd14
File tree
76 files changed
+26887
-20881
lines changed- components
- filters
- hooks
- lib
- partials
- template
- src/main
- java
- resources
- test
- __snapshots__
- mocks
- utils
- avroProcessor
- jsonProcessor
- schemaModel
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
76 files changed
+26887
-20881
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Large diffs are not rendered by default.
0 commit comments